浏览代码

spec: add inline hint for HartMaskIter::next

Signed-off-by: Woshiluo Luo <woshiluo.luo@outlook.com>
Woshiluo Luo 4 月之前
父节点
当前提交
94538522f7
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sbi-spec/src/binary.rs

+ 1 - 0
sbi-spec/src/binary.rs

@@ -900,6 +900,7 @@ impl HartMask {
 impl Iterator for HartMaskIter {
     type Item = usize;
 
+    #[inline]
     fn next(&mut self) -> Option<Self::Item> {
         let non_visited_mask = (!self.visited_mask) & (self.inner.hart_mask);
         if non_visited_mask == 0 {