Remove useless cfgs (#2764)
This commit is contained in:
parent
cc442f4dc8
commit
be21fae490
@ -18,7 +18,6 @@ use crate::{
|
||||
/// A corpus that keeps a maximum number of [`Testcase`]s in memory
|
||||
/// and load them from disk, when they are being used.
|
||||
/// The eviction policy is FIFO.
|
||||
#[cfg(feature = "std")]
|
||||
#[derive(Default, Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct CachedOnDiskCorpus<I> {
|
||||
inner: InMemoryOnDiskCorpus<I>,
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
use alloc::string::String;
|
||||
use core::cell::RefCell;
|
||||
#[cfg(feature = "std")]
|
||||
use std::{fs, fs::File, io::Write};
|
||||
use std::{
|
||||
fs::OpenOptions,
|
||||
fs,
|
||||
fs::{File, OpenOptions},
|
||||
io,
|
||||
io::Write,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
@ -50,7 +50,6 @@ fn try_create_new<P: AsRef<Path>>(path: P) -> Result<Option<File>, io::Error> {
|
||||
/// A corpus able to store [`Testcase`]s to disk, while also keeping all of them in memory.
|
||||
///
|
||||
/// Metadata is written to a `.<filename>.metadata` file in the same folder by default.
|
||||
#[cfg(feature = "std")]
|
||||
#[derive(Default, Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct InMemoryOnDiskCorpus<I> {
|
||||
inner: InMemoryCorpus<I>,
|
||||
|
@ -22,7 +22,6 @@ use crate::{
|
||||
};
|
||||
|
||||
/// Options for the the format of the on-disk metadata
|
||||
#[cfg(feature = "std")]
|
||||
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum OnDiskMetadataFormat {
|
||||
/// A binary-encoded postcard
|
||||
|
@ -862,7 +862,7 @@ pub trait CommandConfigurator<I, C = Child>: Sized {
|
||||
}
|
||||
|
||||
/// waitpid wrapper that ignores some signals sent by the ptraced child
|
||||
#[cfg(all(feature = "std", target_os = "linux"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn waitpid_filtered(pid: Pid, options: Option<WaitPidFlag>) -> Result<WaitStatus, Errno> {
|
||||
loop {
|
||||
let wait_status = waitpid(pid, options);
|
||||
|
@ -58,7 +58,7 @@ pub(crate) struct Itimerval {
|
||||
pub it_value: Timeval,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "std", unix, not(target_os = "linux")))]
|
||||
#[cfg(all(unix, not(target_os = "linux")))]
|
||||
extern "C" {
|
||||
pub(crate) fn setitimer(
|
||||
which: libc::c_int,
|
||||
@ -102,7 +102,7 @@ pub struct TimerStruct {
|
||||
pub(crate) tmout_start_time: Duration,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "std", windows))]
|
||||
#[cfg(windows)]
|
||||
#[allow(non_camel_case_types)]
|
||||
type PTP_TIMER_CALLBACK = unsafe extern "system" fn(
|
||||
param0: PTP_CALLBACK_INSTANCE,
|
||||
|
@ -349,7 +349,7 @@ pub mod child_signal_handlers {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(feature = "std", feature = "fork", unix))]
|
||||
#[cfg(all(feature = "fork", unix))]
|
||||
mod tests {
|
||||
use libafl_bolts::tuples::tuple_list;
|
||||
use serial_test::serial;
|
||||
|
@ -3,7 +3,7 @@
|
||||
//! The [`StdOutObserver`] and [`StdErrObserver`] observers look at the stdout of a program
|
||||
//! The executor must explicitly support these observers.
|
||||
#![cfg_attr(
|
||||
all(feature = "std", unix),
|
||||
unix,
|
||||
doc = r"For example, they are supported on the [`crate::executors::CommandExecutor`]."
|
||||
)]
|
||||
|
||||
@ -19,11 +19,8 @@ use crate::{observers::Observer, Error};
|
||||
/// Only works for supported executors.
|
||||
///
|
||||
/// # Example usage
|
||||
#[cfg_attr(all(feature = "std", target_os = "linux", not(miri)), doc = " ```")] // miri doesn't like the Command crate, linux as a shorthand for the availability of base64
|
||||
#[cfg_attr(
|
||||
not(all(feature = "std", target_os = "linux", not(miri))),
|
||||
doc = " ```ignore"
|
||||
)]
|
||||
#[cfg_attr(all(target_os = "linux", not(miri)), doc = " ```")] // miri doesn't like the Command crate, linux as a shorthand for the availability of base64
|
||||
#[cfg_attr(not(all(target_os = "linux", not(miri))), doc = " ```ignore")]
|
||||
/// use std::borrow::Cow;
|
||||
///
|
||||
/// use libafl::{
|
||||
|
@ -282,7 +282,7 @@ where
|
||||
client_config: EventConfig::AlwaysUnique,
|
||||
time: current_time(),
|
||||
forward_id: None,
|
||||
#[cfg(all(unix, feature = "std", feature = "multi_machine"))]
|
||||
#[cfg(all(unix, feature = "multi_machine"))]
|
||||
node_id: None,
|
||||
},
|
||||
)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user