Merge pull request #2506 from tnull/2023-08-dont-leak-internal-macros
[rust-lightning] / lightning / src / util / chacha20.rs
index 85c0a47d4a5064f2fabe22e51829a7d1b60ed052..c729e6847470e024858911793b9273592b0f7fb6 100644 (file)
@@ -9,9 +9,9 @@
 // You may not use this file except in accordance with one or both of these
 // licenses.
 
-use io;
+use crate::io;
 
-#[cfg(not(feature = "fuzztarget"))]
+#[cfg(not(fuzzing))]
 mod real_chacha {
        use core::cmp;
        use core::convert::TryInto;
@@ -272,10 +272,10 @@ mod real_chacha {
                }
        }
 }
-#[cfg(not(feature = "fuzztarget"))]
+#[cfg(not(fuzzing))]
 pub use self::real_chacha::ChaCha20;
 
-#[cfg(feature = "fuzztarget")]
+#[cfg(fuzzing)]
 mod fuzzy_chacha {
        pub struct ChaCha20 {}
 
@@ -297,7 +297,7 @@ mod fuzzy_chacha {
                pub fn process_in_place(&mut self, _input_output: &mut [u8]) {}
        }
 }
-#[cfg(feature = "fuzztarget")]
+#[cfg(fuzzing)]
 pub use self::fuzzy_chacha::ChaCha20;
 
 pub(crate) struct ChaChaReader<'a, R: io::Read> {
@@ -316,7 +316,7 @@ impl<'a, R: io::Read> io::Read for ChaChaReader<'a, R> {
 
 #[cfg(test)]
 mod test {
-       use prelude::*;
+       use crate::prelude::*;
        use core::iter::repeat;
 
        use super::ChaCha20;