error[E0308]: mismatched types
--> src/format.rs:51:6
|
51 | ) -> Option<String> {
| -------------- expected `Option<String>` because of return type
52 | for ann in annotations {
| _____^
53 | | match (ann.range.0, ann.range.1) {
54 | | (None, None) => continue,
55 | | (Some(start), Some(end)) if start > end_index => continue,
56 | | (Some(start), Some(end)) if start >= start_index => {
57 | | let label = if let Some(ref label) = ann.label {
58 | | format!(" {}", label)
59 | | } else {
60 | | String::from("")
61 | | };
62 | |
63 | | return Some(format!(
64 | | "{}{}{}",
65 | | " ".repeat(start - start_index),
66 | | "^".repeat(end - start),
67 | | label
68 | | ));
69 | | }
70 | | _ => continue,
71 | | }
72 | | }
| |____^ expected enum `std::option::Option`
|