diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-04-18 19:10:55 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-04-18 19:16:13 +0200 |
| commit | d10b53df0b487036b0d639b6033f4568648cfff1 (patch) | |
| tree | 5209581e847af37c9a770e2e7e43d95bff2e113f /docs/src/lib.rs | |
| parent | 35302d20047c58baa99065a4574eafe1920e7be6 (diff) | |
Clippy
Diffstat (limited to 'docs/src/lib.rs')
| -rw-r--r-- | docs/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/src/lib.rs b/docs/src/lib.rs index 92ff69f0..4a20a008 100644 --- a/docs/src/lib.rs +++ b/docs/src/lib.rs @@ -229,7 +229,7 @@ fn category_page(resolver: &dyn Resolver, category: &str) -> PageModel { for group in grouped { let mut functions = vec![]; for name in &group.functions { - let value = focus.get(&name).unwrap(); + let value = focus.get(name).unwrap(); let Value::Func(func) = value else { panic!("not a function") }; let info = func.info().unwrap(); functions.push(func_model(resolver, func, info)); @@ -335,7 +335,7 @@ fn func_model(resolver: &dyn Resolver, func: &Func, info: &FuncInfo) -> FuncMode let mut s = unscanny::Scanner::new(info.docs); let docs = s.eat_until("\n## Methods").trim(); FuncModel { - name: info.name.into(), + name: info.name, display: info.display, oneliner: oneliner(docs), showable: func.element().is_some(), @@ -721,7 +721,7 @@ pub fn urlify(title: &str) -> String { /// Extract the first line of documentation. fn oneliner(docs: &str) -> &str { - docs.lines().next().unwrap_or_default().into() + docs.lines().next().unwrap_or_default() } /// The order of types in the documentation. |
