Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 2978231

Browse files
committed
Fix type ascription in rls-vfs
1 parent 6da795c commit 2978231

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rls-vfs/src/test.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ fn test_user_data(with_len: bool) {
216216
assert_eq!(
217217
vfs.with_user_data(&Path::new("foo"), |u| {
218218
assert_eq!(*u.unwrap().1, 43);
219-
Err(Error::BadLocation): Result<(), Error>
219+
Result::Err::<(), Error>(Error::BadLocation)
220220
}),
221221
Err(Error::BadLocation)
222222
);
@@ -237,7 +237,9 @@ fn test_user_data(with_len: bool) {
237237
// Compute (clear) and read data.
238238
vfs.set_user_data(&Path::new("foo"), Some(42)).unwrap();
239239
assert_eq!(
240-
vfs.with_user_data(&Path::new("foo"), |_| Err(Error::NoUserDataForFile): Result<(), Error>),
240+
vfs.with_user_data(&Path::new("foo"), |_| Result::Err::<(), Error>(
241+
Error::NoUserDataForFile
242+
)),
241243
Err(Error::NoUserDataForFile)
242244
);
243245
vfs.with_user_data(&Path::new("foo"), |u| {

0 commit comments

Comments
 (0)