Skip to content

Commit

Permalink
Fix warnings + always build as no_std
Browse files Browse the repository at this point in the history
  • Loading branch information
athre0z committed Mar 9, 2024
1 parent 75c4d44 commit 2fb7aea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ bitflags = "2"
serde = { version = "1.0", features = ["derive"], optional = true }

[features]
default = ["std", "full-decoder", "formatter"]
default = ["full-decoder", "formatter"]
alloc = []
std = ["alloc"]
std = ["alloc"] # currently alias for "alloc", but may change in the future
full-decoder = []
formatter = ["alloc", "full-decoder"]
encoder = ["alloc", "full-decoder"]
Expand Down
4 changes: 3 additions & 1 deletion src/decoder.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::*;
use core::{fmt, hash, marker::PhantomData, mem, mem::MaybeUninit, ops, ptr};
use core::{fmt, marker::PhantomData, mem::MaybeUninit, ops};
#[cfg(feature = "full-decoder")]
use core::{hash,mem, ptr};

/// Decodes raw instruction bytes into a machine-readable struct.
#[derive(Clone, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![no_std]
// The doc-test in README.md needs formatter
#![cfg_attr(feature = "formatter", doc = include_str!("../README.md"))]
#![cfg_attr(not(feature = "std"), no_std)]

//! ## Navigation
//!
Expand Down

0 comments on commit 2fb7aea

Please sign in to comment.