Get rid of the #![feature(associated_consts)].
parent
71268ace88
commit
151b3ba07b
|
@ -3,6 +3,7 @@ name = "smoltcp"
|
|||
version = "0.1.0"
|
||||
authors = ["whitequark <whitequark@whitequark.org>"]
|
||||
license = "0BSD"
|
||||
readme-file = "README.md"
|
||||
|
||||
[dependencies]
|
||||
byteorder = { version = "0.5", default-features = false }
|
||||
|
|
|
@ -6,6 +6,11 @@ real-time systems. Its design goals are simplicity and robustness. Its design an
|
|||
include complicated compile-time computations, such as macro or type tricks, even
|
||||
at cost of performance degradation.
|
||||
|
||||
_smoltcp_ does not need heap allocation *at all*, is [extensively documented][docs],
|
||||
and compiles on stable Rust.
|
||||
|
||||
[docs]: https://m-labs.github.io/smoltcp/smoltcp/index.html
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#![feature(associated_consts)]
|
||||
#![cfg_attr(feature = "use_alloc", feature(alloc))]
|
||||
#![no_std]
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ impl<'a> PacketBuffer<'a> {
|
|||
pub fn new<T>(payload: T) -> PacketBuffer<'a>
|
||||
where T: Into<Managed<'a, [u8]>> {
|
||||
PacketBuffer {
|
||||
endpoint: IpEndpoint::UNSPECIFIED,
|
||||
endpoint: IpEndpoint::default(),
|
||||
size: 0,
|
||||
payload: payload.into()
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ impl fmt::Display for EtherType {
|
|||
pub struct Address(pub [u8; 6]);
|
||||
|
||||
impl Address {
|
||||
pub const BROADCAST: Address = Address([0xff; 6]);
|
||||
// pub const BROADCAST: Address = Address([0xff; 6]);
|
||||
|
||||
/// Construct an Ethernet address from a sequence of octets, in big-endian.
|
||||
///
|
||||
|
|
|
@ -85,7 +85,7 @@ pub struct Endpoint {
|
|||
}
|
||||
|
||||
impl Endpoint {
|
||||
pub const UNSPECIFIED: Endpoint = Endpoint { addr: Address::Unspecified, port: 0 };
|
||||
// pub const UNSPECIFIED: Endpoint = Endpoint { addr: Address::Unspecified, port: 0 };
|
||||
|
||||
/// Create an endpoint address from given address and port.
|
||||
pub fn new(addr: Address, port: u16) -> Endpoint {
|
||||
|
|
|
@ -11,8 +11,8 @@ pub use super::IpProtocol as Protocol;
|
|||
pub struct Address(pub [u8; 4]);
|
||||
|
||||
impl Address {
|
||||
pub const UNSPECIFIED: Address = Address([0x00; 4]);
|
||||
pub const BROADCAST: Address = Address([0xff; 4]);
|
||||
// pub const UNSPECIFIED: Address = Address([0x00; 4]);
|
||||
// pub const BROADCAST: Address = Address([0xff; 4]);
|
||||
|
||||
/// Construct an IPv4 address from a sequence of octets, in big-endian.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue