You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
suricata/rust
Philippe Antoine 9a0edd0ce5 rust/dns: fix clippy char_indices_as_byte_indices
error: indexing into a string with a character position where a byte index is expected
  --> src/dns/detect.rs:45:39
   |
45 |                 let code: u8 = opcode[i..].parse().map_err(|_| ())?;
   |                                       ^
   |
   = note: a character can take up more than one byte, so they are not interchangeable
note: position comes from the enumerate iterator
  --> src/dns/detect.rs:36:10
   |
36 |     for (i, c) in opcode.chars().enumerate() {
   |          ^                       ^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_indices_as_byte_indices
   = note: `#[deny(clippy::char_indices_as_byte_indices)]` on by default
help: consider using `.char_indices()` instead
   |
36 -     for (i, c) in opcode.chars().enumerate() {
36 +     for (i, c) in opcode.char_indices() {
4 months ago
..
.cargo rust: rename .cargo/config to .cargo/config.toml 1 year ago
derive rust/applayer: use c_int as return type for get_info_by_id 12 months ago
src rust/dns: fix clippy char_indices_as_byte_indices 4 months ago
.gitignore rust: rename .cargo/config to .cargo/config.toml 1 year ago
Cargo.lock.in rust: update brotli crate to latest version 4 months ago
Cargo.toml.in rust: update brotli crate to latest version 4 months ago
Makefile.am rust: rename .cargo/config to .cargo/config.toml 1 year ago
cbindgen.toml ftp: add events for command too long 3 years ago
rustfmt.toml