Skip to content

Commit e098059

Browse files
committed
Unbreak detect_features for arm and aarch64
1 parent 61cab5d commit e098059

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/runtime/aarch64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ pub enum __Feature {
3232
}
3333

3434
pub fn detect_features<T: linux::FeatureQuery>(mut x: T) -> usize {
35-
let value: usize = 0;
35+
let mut value: usize = 0;
3636
{
3737
let mut enable_feature = |f| {
3838
if x.has_feature(&f) {
39-
bit::set(value, f as u32);
39+
value = bit::set(value, f as u32);
4040
}
4141
};
4242
enable_feature(__Feature::asimd);

src/runtime/arm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ pub enum __Feature {
2929
}
3030

3131
pub fn detect_features<T: linux::FeatureQuery>(mut x: T) -> usize {
32-
let value: usize = 0;
32+
let mut value: usize = 0;
3333
{
3434
let mut enable_feature = |f| {
3535
if x.has_feature(&f) {
36-
bit::set(value, f as u32);
36+
value = bit::set(value, f as u32);
3737
}
3838
};
3939
enable_feature(__Feature::neon);

0 commit comments

Comments
 (0)