mirror of
https://github.com/Noratrieb/terminal-chat.git
synced 2026-01-14 08:30:13 +01:00
can write with self
This commit is contained in:
commit
04001ac5db
9 changed files with 76 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/target
|
||||
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/../../../../../../:\Users\nilsh\CLionProjects\SimpleCMDChat\.idea/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
11
.idea/SimpleCMDChat.iml
generated
Normal file
11
.idea/SimpleCMDChat.iml
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="CPP_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/../terminal_chat">
|
||||
<sourceFolder url="file://$MODULE_DIR$/../terminal_chat/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../terminal_chat/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
10
.idea/misc.xml
generated
Normal file
10
.idea/misc.xml
generated
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="generalSettings">
|
||||
<MavenGeneralSettings>
|
||||
<option name="mavenHome" value="C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.1\plugins\maven\lib\maven3" />
|
||||
</MavenGeneralSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/../terminal_chat/.idea/SimpleCMDChat.iml" filepath="$PROJECT_DIR$/../terminal_chat/.idea/SimpleCMDChat.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
5
Cargo.lock
generated
Normal file
5
Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "terminal_chat"
|
||||
version = "0.1.0"
|
||||
9
Cargo.toml
Normal file
9
Cargo.toml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[package]
|
||||
name = "terminal_chat"
|
||||
version = "0.1.0"
|
||||
authors = ["Nilstrieb <nils.heydecker@gmx.ch>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
0
src/lib.rs
Normal file
0
src/lib.rs
Normal file
24
src/main.rs
Normal file
24
src/main.rs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
use std::io::{self, Write};
|
||||
|
||||
fn main() {
|
||||
println!("
|
||||
_______ _ _ _____ _ _
|
||||
|__ __| (_) | |/ ____| | | |
|
||||
| | ___ _ __ _ __ ___ _ _ __ __ _| | | | |__ __ _| |_
|
||||
| |/ _ \\ '__| '_ ` _ \\| | '_ \\ / _` | | | | '_ \\ / _` | __|
|
||||
| | __/ | | | | | | | | | | | (_| | | |____| | | | (_| | |_
|
||||
|_|\\___|_| |_| |_| |_|_|_| |_|\\__,_|_|\\_____|_| |_|\\__,_|\\__|
|
||||
---------------------------------------------------------------
|
||||
Version 0.1");
|
||||
let stdin = io::stdin();
|
||||
|
||||
loop {
|
||||
print!("> ");
|
||||
io::stdout().flush();
|
||||
let mut buffer = String::new();
|
||||
|
||||
stdin.read_line(&mut buffer);
|
||||
|
||||
println!("{}", buffer);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue