revert some more constification.

This commit is contained in:
Mazdak Farrokhzad
2018-10-25 19:37:52 +02:00
parent e15c62d61f
commit 38a90406d3
7 changed files with 16 additions and 16 deletions

View File

@@ -104,7 +104,7 @@ impl<T> Cursor<T> {
/// # force_inference(&buff);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn new(inner: T) -> Cursor<T> {
pub fn new(inner: T) -> Cursor<T> {
Cursor { pos: 0, inner: inner }
}
@@ -138,7 +138,7 @@ impl<T> Cursor<T> {
/// let reference = buff.get_ref();
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn get_ref(&self) -> &T { &self.inner }
pub fn get_ref(&self) -> &T { &self.inner }
/// Gets a mutable reference to the underlying value in this cursor.
///
@@ -179,7 +179,7 @@ impl<T> Cursor<T> {
/// assert_eq!(buff.position(), 1);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn position(&self) -> u64 { self.pos }
pub fn position(&self) -> u64 { self.pos }
/// Sets the position of this cursor.
///

View File

@@ -885,7 +885,7 @@ impl Initializer {
/// Returns a new `Initializer` which will zero out buffers.
#[unstable(feature = "read_initializer", issue = "42788")]
#[inline]
pub const fn zeroing() -> Initializer {
pub fn zeroing() -> Initializer {
Initializer(true)
}
@@ -906,7 +906,7 @@ impl Initializer {
/// Indicates if a buffer should be initialized.
#[unstable(feature = "read_initializer", issue = "42788")]
#[inline]
pub const fn should_initialize(&self) -> bool {
pub fn should_initialize(&self) -> bool {
self.0
}

View File

@@ -99,7 +99,7 @@ pub struct Empty { _priv: () }
/// assert!(buffer.is_empty());
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn empty() -> Empty { Empty { _priv: () } }
pub fn empty() -> Empty { Empty { _priv: () } }
#[stable(feature = "rust1", since = "1.0.0")]
impl Read for Empty {
@@ -199,7 +199,7 @@ pub struct Sink { _priv: () }
/// assert_eq!(num_bytes, 5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn sink() -> Sink { Sink { _priv: () } }
pub fn sink() -> Sink { Sink { _priv: () } }
#[stable(feature = "rust1", since = "1.0.0")]
impl Write for Sink {

View File

@@ -926,7 +926,7 @@ impl Stdio {
/// assert_eq!(String::from_utf8_lossy(&output.stdout), "!dlrow ,olleH\n");
/// ```
#[stable(feature = "process", since = "1.0.0")]
pub const fn piped() -> Stdio { Stdio(imp::Stdio::MakePipe) }
pub fn piped() -> Stdio { Stdio(imp::Stdio::MakePipe) }
/// The child inherits from the corresponding parent descriptor.
///
@@ -961,7 +961,7 @@ impl Stdio {
/// println!("You piped in the reverse of: {}", String::from_utf8_lossy(&output.stdout));
/// ```
#[stable(feature = "process", since = "1.0.0")]
pub const fn inherit() -> Stdio { Stdio(imp::Stdio::Inherit) }
pub fn inherit() -> Stdio { Stdio(imp::Stdio::Inherit) }
/// This stream will be ignored. This is the equivalent of attaching the
/// stream to `/dev/null`
@@ -998,7 +998,7 @@ impl Stdio {
/// // Ignores any piped-in input
/// ```
#[stable(feature = "process", since = "1.0.0")]
pub const fn null() -> Stdio { Stdio(imp::Stdio::Null) }
pub fn null() -> Stdio { Stdio(imp::Stdio::Null) }
}
impl FromInner<imp::Stdio> for Stdio {

View File

@@ -286,7 +286,7 @@ impl Builder {
/// handler.join().unwrap();
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn new() -> Builder {
pub fn new() -> Builder {
Builder {
name: None,
stack_size: None,