Skip to content

Commit 0da285e

Browse files
committed
gio/cancellable-future: Use the same wording of Gio for errors
It would be nicer to just return the actual glib::Error, but that would imply breaking the API sadly, so let's just craft it manually
1 parent 4bf4749 commit 0da285e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gio/src/cancellable_future.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ where
171171

172172
impl From<Cancelled> for glib::Error {
173173
fn from(_: Cancelled) -> Self {
174-
glib::Error::new(IOErrorEnum::Cancelled, "Task cancelled")
174+
glib::Error::new(IOErrorEnum::Cancelled, "Operation was cancelled")
175175
}
176176
}
177177

178178
impl std::error::Error for Cancelled {}
179179

180180
impl Debug for Cancelled {
181181
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
182-
write!(f, "Task cancelled")
182+
write!(f, "Operation was cancelled")
183183
}
184184
}
185185

0 commit comments

Comments
 (0)