Skip to content

Commit 45f7b74

Browse files
committed
Fix compiler warnings with newer Rust
1 parent be16bca commit 45f7b74

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cpp_build/src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ fn skip_literal(mut input: Cursor) -> PResult<bool> {
225225
Ok((input, false))
226226
}
227227

228-
fn new_cursor(s: &str) -> Cursor {
228+
fn new_cursor(s: &'_ str) -> Cursor<'_> {
229229
Cursor { rest: s, off: 0, line: 0, column: 0 }
230230
}
231231

cpp_build/src/strnom.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub fn whitespace(input: Cursor) -> PResult<()> {
128128
Ok((input.advance(input.len()), ()))
129129
}
130130

131-
pub fn block_comment(input: Cursor) -> PResult<&str> {
131+
pub fn block_comment(input: Cursor<'_>) -> PResult<'_, &str> {
132132
if !input.starts_with("/*") {
133133
return Err(LexError { line: input.line });
134134
}
@@ -177,7 +177,7 @@ fn is_ident_continue(c: char) -> bool {
177177
c.is_ascii_alphanumeric() || c == '_' || (c > '\x7f' && UnicodeXID::is_xid_continue(c))
178178
}
179179

180-
pub fn symbol(input: Cursor) -> PResult<&str> {
180+
pub fn symbol(input: Cursor<'_>) -> PResult<'_, &str> {
181181
let mut chars = input.char_indices();
182182

183183
let raw = input.starts_with("r#");

0 commit comments

Comments
 (0)