Skip to content

Commit 4c57ea4

Browse files
committed
into_inner is most Rust=y
1 parent 4cdeba3 commit 4c57ea4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl<T> Array<T> {
147147

148148
/// Returns the underlying data vector for this Array in the
149149
/// higher-dimensional equivalent of row-major order.
150-
pub fn extract(self) -> Vec<T> {
150+
pub fn into_inner(self) -> Vec<T> {
151151
self.data
152152
}
153153
}

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ mod tests {
4949
}
5050

5151
#[test]
52-
fn test_extract() {
52+
fn test_into_inner() {
5353
let a = Array::from_vec(vec![0i32, 1, 2], -1);
54-
let a = a.extract();
54+
let a = a.into_inner();
5555
assert_eq!(a.len(), 3);
5656
assert_eq!(0, a[0]);
5757
assert_eq!(1, a[1]);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy