14 lines
190 B
Rust
14 lines
190 B
Rust
fn foo(x: str/&) -> u8 {
|
|
x[0]
|
|
}
|
|
|
|
fn main() {
|
|
let p = "hello"/~;
|
|
let r = foo(p);
|
|
assert r == 'h' as u8;
|
|
|
|
let p = "hello";
|
|
let r = foo(p);
|
|
assert r == 'h' as u8;
|
|
}
|