rust/library/std/src
klensy 8560d01a96 lib: fix some unnecessary_cast clippy lint
warning: casting raw pointers to the same type and constness is unnecessary (`*mut V` -> `*mut V`)
   --> library\alloc\src\collections\btree\map\entry.rs:357:31
    |
357 |                 let val_ptr = root.borrow_mut().push(self.key, value) as *mut V;
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `root.borrow_mut().push
(self.key, value)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

warning: casting to the same type is unnecessary (`usize` -> `usize`)
   --> library\alloc\src\ffi\c_str.rs:411:56
    |
411 |             let slice = slice::from_raw_parts_mut(ptr, len as usize);
    |                                                        ^^^^^^^^^^^^ help: try: `len`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

warning: casting raw pointers to the same type and constness is unnecessary (`*mut T` -> `*mut T`)
   --> library\alloc\src\slice.rs:516:25
    |
516 |                         (buf.as_mut_ptr() as *mut T).add(buf.len()),
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `buf.as_mut_ptr()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

warning: casting raw pointers to the same type and constness is unnecessary (`*mut T` -> `*mut T`)
   --> library\alloc\src\slice.rs:537:21
    |
537 |                     (buf.as_mut_ptr() as *mut T).add(buf.len()),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `buf.as_mut_ptr()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

warning: casting raw pointers to the same type and constness is unnecessary (`*const ()` -> `*const ()`)
   --> library\alloc\src\task.rs:151:13
    |
151 |             waker as *const (),
    |             ^^^^^^^^^^^^^^^^^^ help: try: `waker`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

warning: casting raw pointers to the same type and constness is unnecessary (`*const ()` -> `*const ()`)
   --> library\alloc\src\task.rs:323:13
    |
323 |             waker as *const (),
    |             ^^^^^^^^^^^^^^^^^^ help: try: `waker`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

warning: casting to the same type is unnecessary (`usize` -> `usize`)
   --> library\std\src\sys_common\net.rs:110:21
    |
110 |             assert!(len as usize >= mem::size_of::<c::sockaddr_in>());
    |                     ^^^^^^^^^^^^ help: try: `len`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

warning: casting to the same type is unnecessary (`usize` -> `usize`)
   --> library\std\src\sys_common\net.rs:116:21
    |
116 |             assert!(len as usize >= mem::size_of::<c::sockaddr_in6>());
    |                     ^^^^^^^^^^^^ help: try: `len`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
2024-03-25 23:19:40 +03:00
..
backtrace remove redundant imports 2023-12-10 10:56:22 +08:00
collections Add "put" as a confusable for insert on hash map/set 2024-03-19 14:28:01 -04:00
env remove redundant imports 2023-12-10 10:56:22 +08:00
error core/any: remove Provider trait 2023-08-13 13:07:53 -06:00
f32 Add gamma and ln_gamma functions to f32 and f64 2023-07-31 07:41:50 -07:00
f64 Add gamma and ln_gamma functions to f32 and f64 2023-07-31 07:41:50 -07:00
ffi Rollup merge of #112136 - clarfonthey:ffi-c_str, r=cuviper 2024-03-10 10:58:14 +01:00
fs Convert [u8] to [i8] in test 2024-03-12 16:05:59 +00:00
hash update version placeholders 2023-12-22 11:01:42 +01:00
io Auto merge of #122754 - Mark-Simulacrum:bootstrap-bump, r=albertlarsan68 2024-03-20 13:43:41 +00:00
net SeqCst->Relaxed in std::net::test. 2024-03-20 15:35:13 +01:00
num removed nonfunctioning benchmark 2024-01-11 11:30:12 -05:00
os std::net: adding acceptfilter feature for netbsd/freebsd. 2024-03-20 18:15:31 +00:00
panic
path remove redundant imports 2023-12-10 10:56:22 +08:00
prelude Implement macro-based deref!() syntax for deref patterns 2024-03-21 11:42:49 -04:00
process Rollup merge of #114379 - RalfJung:command-removed-env-vars, r=m-ou-se 2023-09-22 12:15:25 +02:00
sync docs(sync): normalize dot in fn summaries 2024-03-22 23:04:20 +01:00
sys Rollup merge of #122992 - devnexen:available_parallelism_sol_upd, r=Amanieu 2024-03-24 17:08:19 +01:00
sys_common lib: fix some unnecessary_cast clippy lint 2024-03-25 23:19:40 +03:00
thread SeqCst->Relaxed in thread local test. 2024-03-20 15:38:09 +01:00
time Rollup merge of #103056 - beetrees:timespec-bug-fix, r=thomcc 2023-05-05 18:40:32 +05:30
alloc.rs SeqCst->{Release,Acquire} for alloc error hook. 2024-03-19 15:27:11 +01:00
ascii.rs Add the basic ascii::Char type 2023-05-03 22:09:33 -07:00
backtrace.rs rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
env.rs Remove doc aliases to PATH 2024-02-29 14:28:47 -05:00
error.rs Clean dead codes 2023-11-26 09:25:07 +08:00
f32.rs Use the guaranteed precision of a couple of float functions in docs 2024-03-01 18:57:42 +01:00
f64.rs Use the guaranteed precision of a couple of float functions in docs 2024-03-01 18:57:42 +01:00
fs.rs Rollup merge of #121403 - kornelski:io-oom, r=dtolnay 2024-03-09 21:40:07 +01:00
keyword_docs.rs Mention labelled blocks in break docs 2024-03-15 10:51:57 -07:00
lib.rs panic-in-panic-hook: formatting a message that's just a string is risk-free 2024-03-24 10:29:44 +01:00
macros.rs added column number to dbg!() 2023-12-12 18:12:23 +08:00
num.rs Switch NonZero alias direction. 2024-01-27 16:38:57 +01:00
panic.rs Implement unwind safety for Condvar 2024-02-28 14:56:36 -08:00
panicking.rs panic-in-panic-hook: formatting a message that's just a string is risk-free 2024-03-24 10:29:44 +01:00
path.rs Rollup merge of #120051 - riverbl:os-str-display, r=m-ou-se 2024-02-28 16:04:49 +01:00
process.rs Use generic NonZero everywhere in std. 2024-02-22 15:17:33 +01:00
rt.rs Cfg remove lang items in doctest 2023-12-15 16:17:28 +00:00
time.rs Rust is a proper name: rust → Rust 2024-03-07 07:49:22 +01:00