fixed some formatting

This commit is contained in:
RyuuSleek 2022-11-13 04:55:57 +00:00 committed by GitHub
parent 1a5bdaaf77
commit 8329fff047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -54,7 +54,7 @@ fn main() {
// Fix all errors without adding newline
fn main() {
let s = String::from("hello");
let s = String::from("hello");
s.push(',');
s.push(" world");
s += "!".to_string();
@ -89,8 +89,8 @@ fn main() {
let s1 = String::from("hello,");
let s2 = String::from("world!");
let s3 = s1 + s2;
assert_eq!(s3,"hello,world!");
println!("{}",s1);
assert_eq!(s3, "hello,world!");
println!("{}", s1);
}
```
@ -107,7 +107,7 @@ fn main() {
}
fn greetings(s: String) {
println!("{}",s)
println!("{}", s)
}
```
@ -140,7 +140,7 @@ fn main() {
println!("Unicode character {} (U+211D) is called {}",
unicode_codepoint, character_name );
let long_string = "String literals
let long_string = "String literals
can span multiple lines.
The linebreak and indentation here \
can be escaped too!";
@ -163,7 +163,7 @@ fn main() {
// If you need "# in your string, just use more #s in the delimiter.
// You can use up to 65535 #s.
let delimiter = r###"A string with "# in it. And even "##!"###;
let delimiter = r###"A string with "# in it. And even "##!"###;
println!("{}", delimiter);
let long_delimiter = __;
@ -262,4 +262,4 @@ fn main() {
}
```
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it
> You can find the solutions [here](https://github.com/sunface/rust-by-practice)(under the solutions path), but only use it when you need it