Преглед на файлове

spec: derive `Hash` for `Version`

Signed-off-by: Zhouqi Jiang <luojia@hust.edu.cn>
Zhouqi Jiang преди 5 месеца
родител
ревизия
a32cfca3fc
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      sbi-spec/CHANGELOG.md
  2. 1 1
      sbi-spec/src/base.rs

+ 1 - 1
sbi-spec/CHANGELOG.md

@@ -12,7 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
 - binary: add counter index mask type ([#71](https://github.com/rustsbi/rustsbi/pull/71))
 - pmu: add `shmem_size` module for PMU snapshot shared memory, add unit test for `pmu::shmem_size::SIZE`
 - binary: add function `is_ok_and`, `is_err_and`, `inspect` and `inspect_err` for `SbiRet` structure
-- base: impl `Eq`, `PartialEq`, `Ord`, `PartialOrd` for `Version`, add unit tests
+- base: impl `Eq`, `PartialEq`, `Ord`, `PartialOrd` and `Hash` for `Version`, add unit tests
 
 ### Modified
 

+ 1 - 1
sbi-spec/src/base.rs

@@ -14,7 +14,7 @@ pub const UNAVAILABLE_EXTENSION: usize = 0;
 /// Not to be confused with 'implementation version'.
 ///
 /// Declared in §4.1.
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Ord)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Ord, Hash)]
 #[repr(transparent)]
 pub struct Version {
     raw: usize,