cleanup: 代码块统一,便于粘贴复制用于测试

pull/1395/head
jwcesign 8 months ago committed by GitHub
parent 53122be7f5
commit 8b6fb2fe26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -98,9 +98,7 @@ fn main() {
let result = longest(string1.as_str(), string2); let result = longest(string1.as_str(), string2);
println!("The longest string is {}", result); println!("The longest string is {}", result);
} }
```
```rust
fn longest(x: &str, y: &str) -> &str { fn longest(x: &str, y: &str) -> &str {
if x.len() > y.len() { if x.len() > y.len() {
x x

Loading…
Cancel
Save