Skip to content

Commit b6ad4d6

Browse files
authored
Update docs to suggest TryFrom trait (#198)
1 parent 710cfa2 commit b6ad4d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/addr.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ use bit_field::BitField;
99
/// A canonical 64-bit virtual memory address.
1010
///
1111
/// This is a wrapper type around an `u64`, so it is always 8 bytes, even when compiled
12-
/// on non 64-bit systems. The `UsizeConversions` trait can be used for performing conversions
12+
/// on non 64-bit systems. The
13+
/// [`TryFrom`](https://doc.rust-lang.org/std/convert/trait.TryFrom.html) trait can be used for performing conversions
1314
/// between `u64` and `usize`.
1415
///
1516
/// On `x86_64`, only the 48 lower bits of a virtual address can be used. The top 16 bits need
@@ -22,7 +23,8 @@ pub struct VirtAddr(u64);
2223
/// A 64-bit physical memory address.
2324
///
2425
/// This is a wrapper type around an `u64`, so it is always 8 bytes, even when compiled
25-
/// on non 64-bit systems. The `UsizeConversions` trait can be used for performing conversions
26+
/// on non 64-bit systems. The
27+
/// [`TryFrom`](https://doc.rust-lang.org/std/convert/trait.TryFrom.html) trait can be used for performing conversions
2628
/// between `u64` and `usize`.
2729
///
2830
/// On `x86_64`, only the 52 lower bits of a physical address can be used. The top 12 bits need

0 commit comments

Comments
 (0)