a770fa5a5e5f
string-error-test.yml
id: string-error
valid:
- "fn parse(s: &str) -> Result<Port, PortError> { todo!() }"
- "fn name() -> Option<String> { None }"
- "fn ok() -> Result<String, PortError> { Ok(String::new()) }"
- Err(PortError::Range)
- Err(e)
invalid:
- "fn parse(s: &str) -> Result<Port, String> { todo!() }"
- "type R = Result<(), String>;"
- Err(format!("bad port {s}"))
- Err(e.to_string())
- Err(String::from("bad port"))
- Err("bad port")
No file is open. Choose one in the tree, or press Ctrl+O (⌘O on a Mac) to find one by name.
Syntax highlighting could not load. The unmodified read-only text remains available above.