Skip to content

Commit 8408ed4

Browse files
Invert feature flag from no_std to std
1 parent d9b2e41 commit 8408ed4

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

capnp/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ path = "src/lib.rs"
2020

2121
[dependencies]
2222
quickcheck = { version = "0.2", optional = true }
23-
core_io = { version = "0.1.20190701", features = [ "alloc", "collections" ], optional = true }
23+
core_io = { version = "0.1.20190701", features = [ "alloc", "collections" ] }
2424

2525
[dev-dependencies]
2626
quickcheck = "0.2"
2727

2828
[features]
29-
no_std = ["core_io"]
29+
std = []
3030
rpc = ["futures"]
3131
rpc_try = []
32-
default = []
32+
default = ["std"]
3333

3434
[dependencies.futures]
3535
version = "0.1"

capnp/src/any_pointer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
//! Dynamically typed value.
2323
24-
#[cfg(feature = "no_std")]
24+
#[cfg(not(feature = "std"))]
2525
use crate::io::prelude::*;
2626

2727
use crate::capability::FromClientHook;

capnp/src/capability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//!
2424
//! Roughly corresponds to capability.h in the C++ implementation.
2525
26-
#[cfg(feature = "no_std")]
26+
#[cfg(not(feature = "std"))]
2727
use crate::io::prelude::*;
2828
use core::marker::PhantomData;
2929

capnp/src/capability_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
//! List of capabilities.
2222
23-
#[cfg(feature = "no_std")]
23+
#[cfg(not(feature = "std"))]
2424
use crate::io::prelude::*;
2525
use core::{self, marker::PhantomData};
2626

capnp/src/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,37 @@
2727
//! [capnpc-rust](https://github.com/capnproto/capnproto-rust/capnpc) crate.
2828
#![cfg_attr(feature = "rpc_try", feature(try_trait))]
2929

30-
#![cfg_attr(feature = "no_std", no_std)]
30+
#![cfg_attr(not(feature = "std"), no_std)]
3131

3232
#[cfg(any(feature="quickcheck", test))]
3333
extern crate quickcheck;
3434

3535
#[cfg(feature = "rpc")]
3636
extern crate futures;
3737

38-
#[cfg(feature = "no_std")]
38+
#[cfg(not(feature = "std"))]
3939
#[macro_use]
4040
extern crate alloc;
4141

42-
#[cfg(feature = "no_std")]
42+
#[cfg(not(feature = "std"))]
4343
extern crate core_io;
4444

45-
#[cfg(not(feature = "no_std"))]
45+
#[cfg(feature = "std")]
4646
use std as core;
4747

48-
#[cfg(feature = "no_std")]
48+
#[cfg(not(feature = "std"))]
4949
use core_io as io;
50-
#[cfg(not(feature = "no_std"))]
50+
#[cfg(feature = "std")]
5151
use std::io as io;
5252

53-
#[cfg(feature = "no_std")]
53+
#[cfg(not(feature = "std"))]
5454
use alloc::string as string;
55-
#[cfg(not(feature = "no_std"))]
55+
#[cfg(feature = "std")]
5656
use std::string as string;
5757

58-
#[cfg(feature = "no_std")]
58+
#[cfg(not(feature = "std"))]
5959
use alloc::str as str;
60-
#[cfg(not(feature = "no_std"))]
60+
#[cfg(feature = "std")]
6161
use std::str as str;
6262

6363
/// Constructs a [`Word`](struct.Word.html) from its constituent bytes, accounting
@@ -112,9 +112,9 @@ pub mod text;
112112
pub mod text_list;
113113
pub mod traits;
114114

115-
#[cfg(feature = "no_std")]
115+
#[cfg(not(feature = "std"))]
116116
use alloc::string::String;
117-
#[cfg(feature = "no_std")]
117+
#[cfg(not(feature = "std"))]
118118
use io::prelude::*;
119119

120120
/// Eight bytes of memory with opaque interior. Use [`capnp_word!()`](macro.capnp_word!.html)

capnp/src/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
//! Untyped root container for a Cap'n Proto value.
2323
24-
#[cfg(feature = "no_std")]
24+
#[cfg(not(feature = "std"))]
2525
use crate::io::prelude::*;
2626
use core::{self, convert::From};
2727

capnp/src/private/arena.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
// THE SOFTWARE.
2020

21-
#[cfg(feature = "no_std")]
21+
#[cfg(not(feature = "std"))]
2222
use crate::io::prelude::*;
2323

2424
use core::cell::{Cell, RefCell};

capnp/src/private/capability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2020
// THE SOFTWARE.
2121

22-
#[cfg(feature = "no_std")]
22+
#[cfg(not(feature = "std"))]
2323
use crate::io::prelude::*;
2424
use core;
2525

capnp/src/private/layout.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2020
// THE SOFTWARE.
2121

22-
#[cfg(feature = "no_std")]
22+
#[cfg(not(feature = "std"))]
2323
use crate::io::prelude::*;
2424

2525
use core::{self, mem, ptr, cell::Cell};
@@ -311,7 +311,7 @@ impl WirePointer {
311311
}
312312

313313
mod wire_helpers {
314-
#[cfg(feature = "no_std")]
314+
#[cfg(not(feature = "std"))]
315315
use crate::io::prelude::*;
316316

317317
use core::{self, mem, ptr, slice};

capnpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ name = "capnpc-rust"
2424
path = "src/capnpc-rust.rs"
2525

2626
[dependencies]
27-
capnp = { version = "0.10", path = "../capnp", default-features = false }
27+
capnp = { version = "0.10", path = "../capnp" }
2828

0 commit comments

Comments
 (0)