fix rust v1.75.0 warnings that are probably benign

a lot of re-import warnings have cropped up. While I appreciate
their studiousness on this, the problem is that removing some
of these exports in the API crate could mean that future users
who want access to some API features that aren't used in this
configuration are now unaccessible.

I think it's not a huge problem at the moment, just spam-cleaning
the warnings because there are too many to deal with carefully
at the moment.
This commit is contained in:
bunnie 2024-01-04 19:15:28 +08:00
parent 0d80912f0a
commit 8ec08c9c76
14 changed files with 14 additions and 18 deletions

View file

@ -441,6 +441,9 @@ perform the Xous firmware upgrade. This requires running manual update commands,
- Fix an issue where uninitialized memory is being returned from the kernel due to a pointer assumed to be pointing to `usize` actually pointing to `u8`, thus having its length incorrectly divided by the size of a `usize`
## New in 0.9.16
- Incorporate more stability fixes and formatting changes from @xobs
- Clean up warning and breakages due to Rust 1.75.0. Note that cleaning up one warning forces the code to be
backward-incompatible with earlier versions of Rust. 😖
## Roadmap
- Lots of testing and bug fixes

View file

@ -4,6 +4,7 @@
use crate::arch;
use crate::arch::mem::MemoryMapping;
pub use crate::arch::process::Process as ArchProcess;
#[cfg(not(any(windows, unix)))]
pub use crate::arch::process::Thread;
use crate::platform;
use xous_kernel::arch::ProcessStartup;

View file

@ -5,6 +5,7 @@
// SPDX-LIcense-Identifier: Apache 2.0
#![no_std]
#![allow(unused_imports)]
pub use typenum::{
Unsigned, U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20,

View file

@ -4,6 +4,8 @@
// SPDX-License-Identifier: MIT
// SPDX-LIcense-Identifier: Apache 2.0
#![allow(unused_imports)]
mod bool_pack;
pub use bool_pack::*;

View file

@ -4,6 +4,8 @@
// SPDX-License-Identifier: MIT
// SPDX-LIcense-Identifier: Apache 2.0
#![allow(unused_imports)]
mod op_code;
pub use op_code::*;

View file

@ -69,6 +69,7 @@ pub use backend::serial::u32::field::*;
pub type FieldElement = backend::serial::u32::field::FieldElement2625;
#[cfg(feature = "u32e_backend")]
#[allow(unused_imports)] // this may be used by some other configs, so don't un-export it.
pub use backend::serial::u32e::field::*;
/// A `FieldElement` represents an element of the field
/// \\( \mathbb Z / (2\^{255} - 19)\\).

View file

@ -4,4 +4,3 @@ pub mod locale;
pub use locale::LANG;
pub mod generated;
pub use generated::*;

View file

@ -19,6 +19,7 @@ use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
use xous_semver::SemVer;
// republish this so we can decode the icmpv4 error codes
#[allow(unused_imports)]
pub use smoltcp::wire::Icmpv4DstUnreachable;
// note: this name cannot be changed, because it is baked into `libstd`

View file

@ -11,7 +11,6 @@ pub use fastspace::*;
mod types;
pub use types::*;
mod bcrypt;
pub use bcrypt::*;
// local to the backend
mod murmur3;

View file

@ -144,7 +144,6 @@ pub enum RootkeyResult {
}
/// AES operation definitions
pub use cipher::{BlockCipher, consts::U16};
use keyboard::KeyMap;
use zeroize::Zeroize;

View file

@ -14,6 +14,7 @@ use std::convert::TryInto;
pub use cipher::{BlockSizeUser, BlockClosure, ParBlocksSizeUser, BlockBackend,
BlockEncrypt, BlockDecrypt, consts::U16, inout::InOut, generic_array::GenericArray,
BlockCipher
};
pub(crate) type BatchBlocks = GenericArray<Block, U16>;

View file

@ -1,4 +1,4 @@
#![allow(dead_code)]
#![allow(unused_imports)]
pub use xous_usb_hid::page::Keyboard as UsbKeyCode;
#[cfg(any(feature="precursor", feature="renode"))]

View file

@ -105,20 +105,6 @@ impl OutputWriter {
// uart_csr.wfo(utra::uart::EV_PENDING_RX, 1);
}
}
/// Write a buffer to the output and return the number of
/// bytes written. This is mostly compatible with `std::io::Write`,
/// except it is infallible.
pub fn write(&mut self, buf: &[u8]) -> usize {
for c in buf {
self.putc(*c);
}
buf.len()
}
pub fn write_all(&mut self, buf: &[u8]) -> core::result::Result<usize, ()> {
Ok(self.write(buf))
}
}
impl Write for OutputWriter {

View file

@ -1,3 +1,4 @@
#![cfg_attr(any(target_os = "none", not(feature = "std")), no_std)]
pub mod generated;
#[cfg(not(any(windows, unix)))]
pub use generated::*;