Skip to content

Commit 0fa4adf

Browse files
committed
use self + space
1 parent ba8f079 commit 0fa4adf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ impl<T> Clone for Array<T>
522522
where
523523
T: HasAfEnum,
524524
{
525-
fn clone(&self) -> Self{
525+
fn clone(&self) -> Self {
526526
unsafe {
527527
let mut temp: i64 = 0;
528528
let ret_val = af_retain_array(&mut temp as MutAfArray, self.handle as AfArray);

src/vision/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ impl Features {
158158
///
159159
/// This object is basically a bunch of Arrays.
160160
#[allow(unused_mut)]
161-
pub fn new(n: u64) -> Features {
161+
pub fn new(n: u64) -> Self {
162162
unsafe {
163163
let mut temp: i64 = 0;
164164
let err_val = af_create_features(&mut temp as *mut c_longlong as MutFeat, n as DimT);
165165
HANDLE_ERROR(AfError::from(err_val));
166-
Features { feat: temp }
166+
Self { feat: temp }
167167
}
168168
}
169169

@@ -197,15 +197,15 @@ impl Features {
197197
}
198198

199199
impl Clone for Features {
200-
fn clone(&self) -> Features {
200+
fn clone(&self) -> Self {
201201
unsafe {
202202
let mut temp: i64 = 0;
203203
let ret_val = af_retain_features(
204204
&mut temp as *mut c_longlong as MutFeat,
205205
self.feat as *const c_longlong as Feat,
206206
);
207207
HANDLE_ERROR(AfError::from(ret_val));
208-
Features { feat: temp }
208+
Self { feat: temp }
209209
}
210210
}
211211
}

0 commit comments

Comments
 (0)