Skip to content

Commit 2c6adcb

Browse files
committed
fix(virtq): fix writable spelling
Signed-off-by: Tomasz Andrzejak <andreiltd@gmail.com>
1 parent 3aaa98e commit 2c6adcb

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/hyperlight_common/src/virtq/desc.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ impl Descriptor {
108108
avail == wrap && used == wrap
109109
}
110110

111-
/// Is this descriptor writeable by the device?
111+
/// Is this descriptor writable by the device?
112112
#[inline]
113-
pub fn is_writeable(&self) -> bool {
113+
pub fn is_writable(&self) -> bool {
114114
self.flags().contains(DescFlags::WRITE)
115115
}
116116

@@ -295,13 +295,13 @@ mod tests {
295295
}
296296

297297
#[test]
298-
fn writeable_and_next_helpers() {
298+
fn writable_and_next_helpers() {
299299
let mut d = Descriptor::zeroed();
300300
d.flags = (DescFlags::WRITE | DescFlags::NEXT).bits();
301-
assert!(d.is_writeable());
301+
assert!(d.is_writable());
302302
assert!(d.is_next());
303303
d.flags = 0;
304-
assert!(!d.is_writeable());
304+
assert!(!d.is_writable());
305305
assert!(!d.is_next());
306306
}
307307

src/hyperlight_common/src/virtq/ring.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ impl<M: MemOps> RingConsumer<M> {
10401040
}
10411041

10421042
/// Publish a single used descriptor for the chain identified by id.
1043-
/// written_len is the total bytes produced by the device (for writeable part).
1043+
/// written_len is the total bytes produced by the device (for writable part).
10441044
///
10451045
/// # Arguments
10461046
///
@@ -1281,7 +1281,7 @@ impl From<&Descriptor> for BufferElement {
12811281
BufferElement {
12821282
addr: desc.addr,
12831283
len: desc.len,
1284-
writable: desc.is_writeable(),
1284+
writable: desc.is_writable(),
12851285
}
12861286
}
12871287
}
@@ -3236,7 +3236,7 @@ pub(crate) mod tests {
32363236
let desc = Descriptor::read_acquire(reader.mem(), addr).unwrap();
32373237
assert_eq!(desc.addr, 0x1000);
32383238
assert_eq!(desc.len, 4096);
3239-
assert!(desc.is_writeable());
3239+
assert!(desc.is_writable());
32403240
assert!(desc.is_avail(true));
32413241
assert!(!desc.is_used(true));
32423242
}

0 commit comments

Comments
 (0)