Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let mut profile:&str = {
- let array = cmdline.arc();
- {
- let read = array.read().unwrap();
- if read.contains_key("profile"){
- if let Some(prof) = read.get("profile"){
- if prof.len() > 0 {
- prof.as_str()
- }
- }
- }
- }
- {
- let mut write = array.write().unwrap();
- write.insert("profile".to_string(), "default".to_string());
- }
- "default"
- };
- error[E0308]: mismatched types
- --> src/main.rs:177:8
- |
- 67 | fn main() {
- | - expected `()` because of default return type
- ...
- 177 | prof.as_str()
- | ^^^^^^^^^^^^^- help: try adding a semicolon: `;`
- | |
- | expected (), found &str
- |
- = note: expected type `()`
- found type `&str`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement