about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-03-21 05:33:31 +0100
committerGitHub <noreply@github.com>2020-03-21 05:33:31 +0100
commit3e6b1ac96469061320ae1436ee99f39ae1c5ea85 (patch)
tree4ca38f50d3eb143c2fbca709db65598ee9d48172 /src/libcore
parent621f2b7e905644eac2770937434c42f810824631 (diff)
parentad00e9188766b8accdce93b264ed8b13aa12a820 (diff)
downloadrust-3e6b1ac96469061320ae1436ee99f39ae1c5ea85.tar.gz
rust-3e6b1ac96469061320ae1436ee99f39ae1c5ea85.zip
Rollup merge of #70187 - matthiaskrgr:cl2ppy, r=Mark-Simulacrum
more clippy fixes

    * remove redundant returns (clippy::needless_return)
    * remove redundant import (clippy::single_component_path_imports)
    * remove redundant format!() call (clippy::useless_format)
    * don't use ok() before calling expect() (clippy::ok_expect)
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/hint.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs
index f4fb9ab1757..6cbd26a78de 100644
--- a/src/libcore/hint.rs
+++ b/src/libcore/hint.rs
@@ -114,6 +114,6 @@ pub fn black_box<T>(dummy: T) -> T {
     // more than we want, but it's so far good enough.
     unsafe {
         asm!("" : : "r"(&dummy));
-        return dummy;
+        dummy
     }
 }