8000 rune: Try to clean up AnyObj impl · rune-rs/rune@cce2845 · GitHub
[go: up one dir, main page]

Skip to content

Commit cce2845

Browse files
committed
rune: Try to clean up AnyObj impl
1 parent a8c4f97 commit cce2845

File tree

6 files changed

+509
-265
lines changed

6 files changed

+509
-265
lines changed

crates/rune/src/runtime/access.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,18 @@ impl fmt::Display for AccessError {
3535
#[inline]
3636
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3737
match &self.kind {
38-
AccessErrorKind::NotAccessibleRef(s) => write!(f, "Cannot read, value is {s}"),
39-
AccessErrorKind::NotAccessibleMut(s) => write!(f, "Cannot write, value is {s}"),
40-
AccessErrorKind::NotAccessibleTake(s) => write!(f, "Cannot take, value is {s}"),
38+
AccessErrorKind::NotAccessibleRef(s) => write!(
39+
f,
40+
"Cannot read, value has snapshot {s} and is not available for reading"
41+
),
42+
AccessErrorKind::NotAccessibleMut(s) => write!(
43+
f,
44+
"Cannot write, value has snapshot {s} and is not available for writing"
45+
),
46+
AccessErrorKind::NotAccessibleTake(s) => write!(
47+
f,
48+
"Cannot take, value has snapshot {s} and is not available for taking"
49+
),
4150
}
4251
}
4352
}

0 commit comments

Comments
 (0)
0