Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.
GitHub Actions / clippy succeeded Nov 15, 2023 in 0s

clippy

21 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 21
Note 0
Help 0

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 1128 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>`

warning: useless conversion to the same type: `std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>`
    --> src/bin/api.rs:1128:18
     |
1128 |     resultados = resultados.into_iter().rev().into_iter().collect::<Vec<_>>();
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `resultados.into_iter().rev()`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 1120 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
    --> src/bin/api.rs:1110:62
     |
1110 |       let mut resultados: Vec<(String, i64)> = sqlx::query_as(&format!(
     |  ______________________________________________________________^
1111 | |         "SELECT delito, fre
1112 | |            FROM (SELECT id_delito,
1113 | |                         COUNT(*) AS fre 
...    |
1119 | |         ",
1120 | |     ))
     | |_____^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
help: consider using `.to_string()`
     |
1110 ~     let mut resultados: Vec<(String, i64)> = sqlx::query_as(&"SELECT delito, fre
1111 +            FROM (SELECT id_delito,
1112 +                         COUNT(*) AS fre 
1113 +                    FROM delitos 
1114 +                   WHERE id_anio_hecho BETWEEN ? AND ? 
1115 +                     AND id_categoria != 1
1116 +                   GROUP BY id_delito) as R
1117 +            JOIN delito USING(id_delito); 
1118 ~         ".to_string())
     |

Check warning on line 1034 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>`

warning: useless conversion to the same type: `std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>`
    --> src/bin/api.rs:1034:18
     |
1034 |     resultados = resultados.into_iter().rev().into_iter().collect::<Vec<_>>();
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `resultados.into_iter().rev()`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 1026 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
    --> src/bin/api.rs:1016:62
     |
1016 |       let mut resultados: Vec<(String, i64)> = sqlx::query_as(&format!(
     |  ______________________________________________________________^
1017 | |         "SELECT delito, fre
1018 | |            FROM (SELECT id_delito,
1019 | |                         COUNT(*) AS fre 
...    |
1025 | |         ",
1026 | |     ))
     | |_____^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
help: consider using `.to_string()`
     |
1016 ~     let mut resultados: Vec<(String, i64)> = sqlx::query_as(&"SELECT delito, fre
1017 +            FROM (SELECT id_delito,
1018 +                         COUNT(*) AS fre 
1019 +                    FROM delitos 
1020 +                   WHERE id_anio_hecho BETWEEN ? AND ? 
1021 +                     AND id_categoria = 1
1022 +                   GROUP BY id_delito) as R
1023 +            JOIN delito USING(id_delito); 
1024 ~         ".to_string())
     |

Check warning on line 993 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::iter::Take<std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>>`

warning: useless conversion to the same type: `std::iter::Take<std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>>`
   --> src/bin/api.rs:989:18
    |
989 |       resultados = resultados
    |  __________________^
990 | |         .into_iter()
991 | |         .rev()
992 | |         .take(15)
993 | |         .into_iter()
    | |____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into_iter()`
    |
989 ~     resultados = resultados
990 +         .into_iter()
991 +         .rev()
992 +         .take(15)
    |

Check warning on line 970 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:970:13
    |
970 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 936 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::iter::Take<std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>>`

warning: useless conversion to the same type: `std::iter::Take<std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>>`
   --> src/bin/api.rs:932:18
    |
932 |       resultados = resultados
    |  __________________^
933 | |         .into_iter()
934 | |         .rev()
935 | |         .take(15)
936 | |         .into_iter()
    | |____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into_iter()`
    |
932 ~     resultados = resultados
933 +         .into_iter()
934 +         .rev()
935 +         .take(15)
    |

Check warning on line 913 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:913:13
    |
913 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 877 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>`

warning: useless conversion to the same type: `std::iter::Rev<std::vec::IntoIter<(std::string::String, i64)>>`
   --> src/bin/api.rs:877:18
    |
877 |     resultados = resultados.into_iter().rev().into_iter().collect::<Vec<_>>();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `resultados.into_iter().rev()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `#[warn(clippy::useless_conversion)]` on by default

Check warning on line 858 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:858:13
    |
858 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 787 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:787:13
    |
787 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 763 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:763:13
    |
763 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 722 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:722:13
    |
722 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 696 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:696:13
    |
696 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 647 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:647:13
    |
647 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 614 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:614:13
    |
614 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 560 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:560:13
    |
560 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 533 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:533:13
    |
533 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 435 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:435:13
    |
435 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 374 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:374:13
    |
374 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 347 in src/bin/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> src/bin/api.rs:347:13
    |
347 |             format!("")
    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
    = note: `#[warn(clippy::useless_format)]` on by default