[INFO] cloning repository https://github.com/bambdv/belajar-rust-dasar [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/bambdv/belajar-rust-dasar" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbambdv%2Fbelajar-rust-dasar", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbambdv%2Fbelajar-rust-dasar'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6840d26b9a5f4ee4b1a52fc2220d9dc7c554ee23 [INFO] linting bambdv/belajar-rust-dasar against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbambdv%2Fbelajar-rust-dasar" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/bambdv/belajar-rust-dasar [INFO] finished tweaking git repo https://github.com/bambdv/belajar-rust-dasar [INFO] tweaked toml for git repo https://github.com/bambdv/belajar-rust-dasar written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/bambdv/belajar-rust-dasar on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/bambdv/belajar-rust-dasar already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a16c4e034e6014d945acce1fd28af207d4d20744111eb5578af8135aa58c8abf [INFO] running `Command { std: "docker" "start" "-a" "a16c4e034e6014d945acce1fd28af207d4d20744111eb5578af8135aa58c8abf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a16c4e034e6014d945acce1fd28af207d4d20744111eb5578af8135aa58c8abf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a16c4e034e6014d945acce1fd28af207d4d20744111eb5578af8135aa58c8abf", kill_on_drop: false }` [INFO] [stdout] a16c4e034e6014d945acce1fd28af207d4d20744111eb5578af8135aa58c8abf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 5c642bf6759a7a8b27b1eb8eca164f74a0c223ad0727a82ea66e6dd7e70d2c11 [INFO] running `Command { std: "docker" "start" "-a" "5c642bf6759a7a8b27b1eb8eca164f74a0c223ad0727a82ea66e6dd7e70d2c11", kill_on_drop: false }` [INFO] [stderr] Checking belajar-rust-dasar v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `first::say_hello` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use first::say_hello; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `second::say_hello as say_hello_second` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use second::say_hello as say_hello_second; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `model::*` [INFO] [stdout] --> src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use model::*; // untuk mengambil semua member di modul, baik struct, type function dan lain-lain [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BTreeMap`, `BTreeSet`, `HashMap`, `HashSet`, `LinkedList`, `VecDeque`, and `result` [INFO] [stdout] --> src/main.rs:1205:19 [INFO] [stdout] | [INFO] [stdout] 1205 | collections::{BTreeMap, BTreeSet, HashMap, HashSet, LinkedList, VecDeque}, [INFO] [stdout] | ^^^^^^^^ ^^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1209 | result, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `hi` [INFO] [stdout] --> src/main.rs:1925:14 [INFO] [stdout] | [INFO] [stdout] 1925 | macro_rules! hi { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `iteration` [INFO] [stdout] --> src/main.rs:1942:14 [INFO] [stdout] | [INFO] [stdout] 1942 | macro_rules! iteration { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unit` is never used [INFO] [stdout] --> src/main.rs:198:4 [INFO] [stdout] | [INFO] [stdout] 198 | fn unit() { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MINIMUM` is never used [INFO] [stdout] --> src/main.rs:252:7 [INFO] [stdout] | [INFO] [stdout] 252 | const MINIMUM: i32 = 0; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function_a` is never used [INFO] [stdout] --> src/main.rs:280:4 [INFO] [stdout] | [INFO] [stdout] 280 | fn function_a() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function_b` is never used [INFO] [stdout] --> src/main.rs:286:4 [INFO] [stdout] | [INFO] [stdout] 286 | fn function_b() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_goodbye` is never used [INFO] [stdout] --> src/main.rs:499:4 [INFO] [stdout] | [INFO] [stdout] 499 | fn say_goodbye(firs_name: &str, last_name: &str) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `factorial_loop` is never used [INFO] [stdout] --> src/main.rs:510:4 [INFO] [stdout] | [INFO] [stdout] 510 | fn factorial_loop(n: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `factorial_recursive` is never used [INFO] [stdout] --> src/main.rs:530:4 [INFO] [stdout] | [INFO] [stdout] 530 | fn factorial_recursive(n: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_text` is never used [INFO] [stdout] --> src/main.rs:538:4 [INFO] [stdout] | [INFO] [stdout] 538 | fn print_text(value: String, times: u32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_number` is never used [INFO] [stdout] --> src/main.rs:558:4 [INFO] [stdout] | [INFO] [stdout] 558 | fn print_number(n: i32) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hi` is never used [INFO] [stdout] --> src/main.rs:562:4 [INFO] [stdout] | [INFO] [stdout] 562 | fn hi(name: String) { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `full_name` is never used [INFO] [stdout] --> src/main.rs:578:4 [INFO] [stdout] | [INFO] [stdout] 578 | fn full_name(first_name: &String, last_name: &String) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `change_value` is never used [INFO] [stdout] --> src/main.rs:595:4 [INFO] [stdout] | [INFO] [stdout] 595 | fn change_value(_value: &String) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `change_value_mutable` is never used [INFO] [stdout] --> src/main.rs:606:4 [INFO] [stdout] | [INFO] [stdout] 606 | fn change_value_mutable(value: &mut String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_full_name` is never used [INFO] [stdout] --> src/main.rs:624:4 [INFO] [stdout] | [INFO] [stdout] 624 | fn get_full_name(first_name: &String, last_name: &String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Person` is never constructed [INFO] [stdout] --> src/main.rs:667:8 [INFO] [stdout] | [INFO] [stdout] 667 | struct Person { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `say_hello` is never used [INFO] [stdout] --> src/main.rs:675:8 [INFO] [stdout] | [INFO] [stdout] 674 | impl Person { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 675 | fn say_hello(&self, name: &str) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_person` is never used [INFO] [stdout] --> src/main.rs:681:4 [INFO] [stdout] | [INFO] [stdout] 681 | fn print_person(person: &Person) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `GeoPoint` is never constructed [INFO] [stdout] --> src/main.rs:711:8 [INFO] [stdout] | [INFO] [stdout] 711 | struct GeoPoint(f64, f64); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:714:8 [INFO] [stdout] | [INFO] [stdout] 713 | impl GeoPoint { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 714 | fn new(long: f64, lat: f64) -> GeoPoint { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Nothing` is never constructed [INFO] [stdout] --> src/main.rs:734:8 [INFO] [stdout] | [INFO] [stdout] 734 | struct Nothing; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Level` is never used [INFO] [stdout] --> src/main.rs:754:6 [INFO] [stdout] | [INFO] [stdout] 754 | enum Level { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Payment` is never used [INFO] [stdout] --> src/main.rs:778:6 [INFO] [stdout] | [INFO] [stdout] 778 | enum Payment { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `pay` is never used [INFO] [stdout] --> src/main.rs:786:8 [INFO] [stdout] | [INFO] [stdout] 785 | impl Payment { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 786 | fn pay(&self, amount: u32) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Age` is never used [INFO] [stdout] --> src/main.rs:950:6 [INFO] [stdout] | [INFO] [stdout] 950 | type Age = u8; // type alias untu kembuat type data baru [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `IdentityNumber` is never used [INFO] [stdout] --> src/main.rs:951:6 [INFO] [stdout] | [INFO] [stdout] 951 | type IdentityNumber = String; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Customer` is never constructed [INFO] [stdout] --> src/main.rs:953:8 [INFO] [stdout] | [INFO] [stdout] 953 | struct Customer { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Pelanggan` is never used [INFO] [stdout] --> src/main.rs:959:6 [INFO] [stdout] | [INFO] [stdout] 959 | type Pelanggan = Customer; // type alias juga bisa untuk struct [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `CanSayHello` is never used [INFO] [stdout] --> src/main.rs:978:7 [INFO] [stdout] | [INFO] [stdout] 978 | trait CanSayHello { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `CanSayGoodBye` is never used [INFO] [stdout] --> src/main.rs:996:7 [INFO] [stdout] | [INFO] [stdout] 996 | trait CanSayGoodBye { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_hello_trait` is never used [INFO] [stdout] --> src/main.rs:1010:4 [INFO] [stdout] | [INFO] [stdout] 1010 | fn say_hello_trait(value: &impl CanSayHello) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello_and_goodbye` is never used [INFO] [stdout] --> src/main.rs:1015:4 [INFO] [stdout] | [INFO] [stdout] 1015 | fn hello_and_goodbye(value: &(impl CanSayHello + CanSayGoodBye)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SimplePerson` is never constructed [INFO] [stdout] --> src/main.rs:1041:8 [INFO] [stdout] | [INFO] [stdout] 1041 | struct SimplePerson { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_person` is never used [INFO] [stdout] --> src/main.rs:1054:4 [INFO] [stdout] | [INFO] [stdout] 1054 | fn create_person(name: String) -> impl CanSayGoodBye { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `CanSay` is never used [INFO] [stdout] --> src/main.rs:1065:7 [INFO] [stdout] | [INFO] [stdout] 1065 | trait CanSay: CanSayHello + CanSayGoodBye { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SimpleMan` is never constructed [INFO] [stdout] --> src/main.rs:1073:8 [INFO] [stdout] | [INFO] [stdout] 1073 | struct SimpleMan { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/main.rs:1096:8 [INFO] [stdout] | [INFO] [stdout] 1096 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_x` and `get_y` are never used [INFO] [stdout] --> src/main.rs:1103:8 [INFO] [stdout] | [INFO] [stdout] 1102 | impl Point { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 1103 | fn get_x(&self) -> &T { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1106 | fn get_y(&self) -> &T { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Value` is never used [INFO] [stdout] --> src/main.rs:1120:6 [INFO] [stdout] | [INFO] [stdout] 1120 | enum Value { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hi` is never constructed [INFO] [stdout] --> src/main.rs:1139:8 [INFO] [stdout] | [INFO] [stdout] 1139 | struct Hi [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `min` is never used [INFO] [stdout] --> src/main.rs:1157:4 [INFO] [stdout] | [INFO] [stdout] 1157 | fn min(value1: T, value2: T) -> T [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `GetValue` is never used [INFO] [stdout] --> src/main.rs:1182:7 [INFO] [stdout] | [INFO] [stdout] 1182 | trait GetValue [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `double` is never used [INFO] [stdout] --> src/main.rs:1244:4 [INFO] [stdout] | [INFO] [stdout] 1244 | fn double(n: Option) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bagi` is never used [INFO] [stdout] --> src/main.rs:1252:4 [INFO] [stdout] | [INFO] [stdout] 1252 | fn bagi(n: Option) -> Option [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Category` is never constructed [INFO] [stdout] --> src/main.rs:1322:8 [INFO] [stdout] | [INFO] [stdout] 1322 | struct Category { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_with_format` is never used [INFO] [stdout] --> src/main.rs:1357:4 [INFO] [stdout] | [INFO] [stdout] 1357 | fn print_with_format(value: String, format: fn(String) -> String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_uppercase` is never used [INFO] [stdout] --> src/main.rs:1367:4 [INFO] [stdout] | [INFO] [stdout] 1367 | fn to_uppercase(value: String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Counter` is never constructed [INFO] [stdout] --> src/main.rs:1390:8 [INFO] [stdout] | [INFO] [stdout] 1390 | struct Counter { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `increment` is never used [INFO] [stdout] --> src/main.rs:1395:8 [INFO] [stdout] | [INFO] [stdout] 1394 | impl Counter { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 1395 | fn increment(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `connect_database` is never used [INFO] [stdout] --> src/main.rs:1563:4 [INFO] [stdout] | [INFO] [stdout] 1563 | fn connect_database(host: Option) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `connect_cache` is never used [INFO] [stdout] --> src/main.rs:1580:4 [INFO] [stdout] | [INFO] [stdout] 1580 | fn connect_cache(host: Option) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `connect_email` is never used [INFO] [stdout] --> src/main.rs:1586:4 [INFO] [stdout] | [INFO] [stdout] 1586 | fn connect_email(host: Option) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `connect_application` is never used [INFO] [stdout] --> src/main.rs:1593:4 [INFO] [stdout] | [INFO] [stdout] 1593 | fn connect_application(host: Option) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest` is never used [INFO] [stdout] --> src/main.rs:1640:4 [INFO] [stdout] | [INFO] [stdout] 1640 | fn longest<'a>(value1: &'a str, value2: &'a str) -> &'a str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Student` is never constructed [INFO] [stdout] --> src/main.rs:1667:8 [INFO] [stdout] | [INFO] [stdout] 1667 | struct Student<'a, 'b> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `longest_name` is never used [INFO] [stdout] --> src/main.rs:1673:8 [INFO] [stdout] | [INFO] [stdout] 1672 | impl<'a, 'b> Student<'a, 'b> { [INFO] [stdout] | ---------------------------- method in this implementation [INFO] [stdout] 1673 | fn longest_name(&self, student2: &Student<'a, 'b>) -> &'a str { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest_student_name` is never used [INFO] [stdout] --> src/main.rs:1682:4 [INFO] [stdout] | [INFO] [stdout] 1682 | fn longest_student_name<'a, 'b>(student1: &Student<'a, 'b>, student2: &Student<'a, 'b>) -> &'a str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Teacher` is never constructed [INFO] [stdout] --> src/main.rs:1708:8 [INFO] [stdout] | [INFO] [stdout] 1708 | struct Teacher<'a, ID> [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Company` is never constructed [INFO] [stdout] --> src/main.rs:1727:8 [INFO] [stdout] | [INFO] [stdout] 1727 | struct Company { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `display_number` is never used [INFO] [stdout] --> src/main.rs:1761:4 [INFO] [stdout] | [INFO] [stdout] 1761 | fn display_number(v: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `display_number_reference` is never used [INFO] [stdout] --> src/main.rs:1764:4 [INFO] [stdout] | [INFO] [stdout] 1764 | fn display_number_reference(v: &i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ProductCategory` is never used [INFO] [stdout] --> src/main.rs:1769:6 [INFO] [stdout] | [INFO] [stdout] 1769 | enum ProductCategory { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyValue` is never constructed [INFO] [stdout] --> src/main.rs:1809:8 [INFO] [stdout] | [INFO] [stdout] 1809 | struct MyValue { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_hello_reference` is never used [INFO] [stdout] --> src/main.rs:1828:4 [INFO] [stdout] | [INFO] [stdout] 1828 | fn say_hello_reference(name: &String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Book` is never constructed [INFO] [stdout] --> src/main.rs:1840:8 [INFO] [stdout] | [INFO] [stdout] 1840 | struct Book { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Brand` is never used [INFO] [stdout] --> src/main.rs:1858:6 [INFO] [stdout] | [INFO] [stdout] 1858 | enum Brand { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Seller` is never constructed [INFO] [stdout] --> src/main.rs:1882:8 [INFO] [stdout] | [INFO] [stdout] 1882 | struct Seller { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `APPLICATION` is never used [INFO] [stdout] --> src/main.rs:1900:8 [INFO] [stdout] | [INFO] [stdout] 1900 | static APPLICATION: &str = "my App"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `COUNTER` is never used [INFO] [stdout] --> src/main.rs:1907:8 [INFO] [stdout] | [INFO] [stdout] 1907 | static COUNTER: Mutex = Mutex::new(0); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `increment` is never used [INFO] [stdout] --> src/main.rs:1909:4 [INFO] [stdout] | [INFO] [stdout] 1909 | fn increment() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_hello` is never used [INFO] [stdout] --> src/first.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn say_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_hello` is never used [INFO] [stdout] --> src/first.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn say_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `User` is never constructed [INFO] [stdout] --> src/model.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct User { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `say_hello` is never used [INFO] [stdout] --> src/model.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl User { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 9 | pub fn say_hello(&self, name: &str) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_hello` is never used [INFO] [stdout] --> src/second.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn say_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_hello` is never used [INFO] [stdout] --> src/third.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn say_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NONE` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:1121:5 [INFO] [stdout] | [INFO] [stdout] 1121 | NONE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `None` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `VALUE` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:1122:5 [INFO] [stdout] | [INFO] [stdout] 1122 | VALUE(T), [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/main.rs:1212:6 [INFO] [stdout] | [INFO] [stdout] 1212 | impl<'a, 'b> Add<&'b Apple> for &'a Apple { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1212 - impl<'a, 'b> Add<&'b Apple> for &'a Apple { [INFO] [stdout] 1212 + impl<'b> Add<&'b Apple> for &Apple { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/main.rs:1221:6 [INFO] [stdout] | [INFO] [stdout] 1221 | impl<'a, 'b> Sub<&'b Apple> for &'a Apple { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1221 - impl<'a, 'b> Sub<&'b Apple> for &'a Apple { [INFO] [stdout] 1221 + impl<'b> Sub<&'b Apple> for &Apple { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:1245:5 [INFO] [stdout] | [INFO] [stdout] 1245 | / match n { [INFO] [stdout] 1246 | | None => None, [INFO] [stdout] 1247 | | Some(i) => Some(i * 2), [INFO] [stdout] 1248 | | } [INFO] [stdout] | |_____^ help: try: `n.map(|i| i * 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:1256:5 [INFO] [stdout] | [INFO] [stdout] 1256 | / match n { [INFO] [stdout] 1257 | | None => None, [INFO] [stdout] 1258 | | Some(i) => Some(i / T::from(2)), [INFO] [stdout] 1259 | | } [INFO] [stdout] | |_____^ help: try: `n.map(|i| i / T::from(2))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `result` [INFO] [stdout] --> src/main.rs:1209:5 [INFO] [stdout] | [INFO] [stdout] 1209 | result, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `laptop` [INFO] [stdout] --> src/main.rs:1868:9 [INFO] [stdout] | [INFO] [stdout] 1868 | let laptop = Brand::Of("Laptop".to_string(), Rc::clone(&apple)); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_laptop` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `smartwatch` [INFO] [stdout] --> src/main.rs:1871:13 [INFO] [stdout] | [INFO] [stdout] 1871 | let smartwatch = Brand::Of("Smartwacth".to_string(), Rc::clone(&apple)); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_smartwatch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `CanSay` is never used [INFO] [stdout] --> src/main.rs:1065:7 [INFO] [stdout] | [INFO] [stdout] 1065 | trait CanSay: CanSayHello + CanSayGoodBye { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SimpleMan` is never constructed [INFO] [stdout] --> src/main.rs:1073:8 [INFO] [stdout] | [INFO] [stdout] 1073 | struct SimpleMan { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NONE` is never constructed [INFO] [stdout] --> src/main.rs:1121:5 [INFO] [stdout] | [INFO] [stdout] 1120 | enum Value { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] 1121 | NONE, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `price` is never read [INFO] [stdout] --> src/main.rs:1325:5 [INFO] [stdout] | [INFO] [stdout] 1322 | struct Category { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 1325 | price: u16, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `last_name` is never read [INFO] [stdout] --> src/main.rs:1669:5 [INFO] [stdout] | [INFO] [stdout] 1667 | struct Student<'a, 'b> { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 1668 | name: &'a str, [INFO] [stdout] 1669 | last_name: &'b str, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/main.rs:1771:8 [INFO] [stdout] | [INFO] [stdout] 1771 | Of(String, Box), [INFO] [stdout] | -- ^^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ProductCategory` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 1771 - Of(String, Box), [INFO] [stdout] 1771 + Of((), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/main.rs:1859:8 [INFO] [stdout] | [INFO] [stdout] 1859 | Of(String, Rc), [INFO] [stdout] | -- ^^^^^^ ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 1859 - Of(String, Rc), [INFO] [stdout] 1859 + Of((), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `active` is never read [INFO] [stdout] --> src/main.rs:1884:5 [INFO] [stdout] | [INFO] [stdout] 1882 | struct Seller { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 1883 | name: RefCell, [INFO] [stdout] 1884 | active: RefCell, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Seller` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `middle_name`, `last_name`, `email`, and `age` are never read [INFO] [stdout] --> src/model.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 2 | pub first_name: String, [INFO] [stdout] 3 | pub middle_name: String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 4 | pub last_name: String, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 5 | pub email: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 6 | pub age: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:157:18 [INFO] [stdout] | [INFO] [stdout] 157 | let result = true || false; [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `true` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `array` [INFO] [stdout] --> src/main.rs:482:14 [INFO] [stdout] | [INFO] [stdout] 482 | for i in 0..5 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 482 - for i in 0..5 { [INFO] [stdout] 482 + for in &array { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> src/main.rs:893:5 [INFO] [stdout] | [INFO] [stdout] 893 | / match person { [INFO] [stdout] 894 | | Person { [INFO] [stdout] 895 | | first_name, [INFO] [stdout] 896 | | last_name, [INFO] [stdout] ... | [INFO] [stdout] 901 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 893 ~ let Person { [INFO] [stdout] 894 + first_name, [INFO] [stdout] 895 + last_name, [INFO] [stdout] 896 + .. [INFO] [stdout] 897 + } = person; [INFO] [stdout] 898 + { [INFO] [stdout] 899 + println!("{} {}", first_name, last_name); [INFO] [stdout] 900 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NONE` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:1121:5 [INFO] [stdout] | [INFO] [stdout] 1121 | NONE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `None` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `VALUE` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:1122:5 [INFO] [stdout] | [INFO] [stdout] 1122 | VALUE(T), [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/main.rs:1212:6 [INFO] [stdout] | [INFO] [stdout] 1212 | impl<'a, 'b> Add<&'b Apple> for &'a Apple { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1212 - impl<'a, 'b> Add<&'b Apple> for &'a Apple { [INFO] [stdout] 1212 + impl<'b> Add<&'b Apple> for &Apple { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/main.rs:1221:6 [INFO] [stdout] | [INFO] [stdout] 1221 | impl<'a, 'b> Sub<&'b Apple> for &'a Apple { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 1221 - impl<'a, 'b> Sub<&'b Apple> for &'a Apple { [INFO] [stdout] 1221 + impl<'b> Sub<&'b Apple> for &Apple { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:1245:5 [INFO] [stdout] | [INFO] [stdout] 1245 | / match n { [INFO] [stdout] 1246 | | None => None, [INFO] [stdout] 1247 | | Some(i) => Some(i * 2), [INFO] [stdout] 1248 | | } [INFO] [stdout] | |_____^ help: try: `n.map(|i| i * 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/main.rs:1256:5 [INFO] [stdout] | [INFO] [stdout] 1256 | / match n { [INFO] [stdout] 1257 | | None => None, [INFO] [stdout] 1258 | | Some(i) => Some(i / T::from(2)), [INFO] [stdout] 1259 | | } [INFO] [stdout] | |_____^ help: try: `n.map(|i| i / T::from(2))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:1413:5 [INFO] [stdout] | [INFO] [stdout] 1413 | / let mut names = vec![]; [INFO] [stdout] 1414 | | names.push(String::from("Ibrohim")); [INFO] [stdout] 1415 | | names.push(String::from("Hendra")); [INFO] [stdout] 1416 | | names.push(String::from("Sairony")); [INFO] [stdout] | |________________________________________^ help: consider using the `vec![]` macro: `let names = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/main.rs:1535:5 [INFO] [stdout] | [INFO] [stdout] 1535 | while let Some(value) = iterator.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for value in iterator.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/main.rs:1552:17 [INFO] [stdout] | [INFO] [stdout] 1552 | let count = vector.iter().count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `vector.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:1631:5 [INFO] [stdout] | [INFO] [stdout] 1631 | let r: &i32; [INFO] [stdout] | ^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 1636 | r = &40; [INFO] [stdout] | ^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `r` here [INFO] [stdout] | [INFO] [stdout] 1631 ~ [INFO] [stdout] 1632 | { [INFO] [stdout] ... [INFO] [stdout] 1635 | } [INFO] [stdout] 1636 ~ let r: &i32 = &40; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:1662:26 [INFO] [stdout] | [INFO] [stdout] 1662 | result = longest(&string1.as_str(), &str1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `string1.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:1662:45 [INFO] [stdout] | [INFO] [stdout] 1662 | result = longest(&string1.as_str(), &str1) [INFO] [stdout] | ^^^^^ help: change this to: `str1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.94s [INFO] running `Command { std: "docker" "inspect" "5c642bf6759a7a8b27b1eb8eca164f74a0c223ad0727a82ea66e6dd7e70d2c11", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5c642bf6759a7a8b27b1eb8eca164f74a0c223ad0727a82ea66e6dd7e70d2c11", kill_on_drop: false }` [INFO] [stdout] 5c642bf6759a7a8b27b1eb8eca164f74a0c223ad0727a82ea66e6dd7e70d2c11