on master help sign in
Need to allow this lint, the Hook signature requires Option<>.
0e5308bBlaž Hrastnik
helix-term/src/commands.rs+15−1
@@ -1327,10 +1327,24 @@ pub mod insert {
1327 }
1327 }
1328 }
1328 }
1329
1329
1330− // 2021-05-03T17:54:36.326 hx::commands [INFO] SignatureHelp { signatures: [SignatureInformation { label: "fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error>", documentation: None, parameters: Some([ParameterInformation { label: Simple("path: PathBuf"), documentation: None }, ParameterInformation { label: Simple("action: Action"), documentation: None }]), active_parameter: Some(0) }], active_signature: None, active_parameter: Some(0) }
1330+ // SignatureHelp {
1331+ // signatures: [
1332+ // SignatureInformation {
1333+ // label: "fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error>",
1334+ // documentation: None,
1335+ // parameters: Some(
1336+ // [ParameterInformation { label: Simple("path: PathBuf"), documentation: None },
1337+ // ParameterInformation { label: Simple("action: Action"), documentation: None }]
1338+ // ),
1339+ // active_parameter: Some(0)
1340+ // }
1341+ // ],
1342+ // active_signature: None, active_parameter: Some(0)
1343+ // }
1331 }
1344 }
1332
1345
1333 // The default insert hook: simply insert the character
1346 // The default insert hook: simply insert the character
1347+ #[allow(clippy::unnecessary_wraps)] // need to use Option<> because of the Hook signature
1334 fn insert(doc: &Rope, selection: &Selection, ch: char) -> Option<Transaction> {
1348 fn insert(doc: &Rope, selection: &Selection, ch: char) -> Option<Transaction> {
1335 let t = Tendril::from_char(ch);
1349 let t = Tendril::from_char(ch);
1336 let transaction = Transaction::insert(doc, selection, t);
1350 let transaction = Transaction::insert(doc, selection, t);