downgrade 0.1.0

Downgrade a mutable reference to an immutable one.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![doc = include_str!("../README.md")]
#![no_std]
#![deny(missing_docs)]

/// A trait for downgrading mutable references to immutable ones.
pub trait Downgrade {
    /// Downgrade a mutable reference to an immutable one.
    fn downgrade(self: &mut Self) -> &Self {
        self
    }
}

// Blank implementation for all types
impl<T> Downgrade for T {}