Remove Array::replace_elem
Doesn't seem very useful...
This commit is contained in:
parent
70dbef1eb1
commit
dcb0afd57b
1 changed files with 0 additions and 7 deletions
|
@ -13,7 +13,6 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::ops::*;
|
||||
|
||||
|
@ -46,12 +45,6 @@ pub trait Array where
|
|||
unsafe { ptr::swap(&mut self[i], &mut self[j]) };
|
||||
}
|
||||
|
||||
/// Replace an element in the array.
|
||||
#[inline]
|
||||
fn replace_elem(&mut self, i: usize, src: Self::Element) -> Self::Element {
|
||||
mem::replace(&mut self[i], src)
|
||||
}
|
||||
|
||||
/// The sum of the elements of the array.
|
||||
fn sum(self) -> Self::Element where Self::Element: Add<Output = <Self as Array>::Element>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue