remove use of deprecated item 'try': use the ? operator instead
Signed-off-by: Nikola Pajkovsky <nikola.pajkovsky@livesporttv.cz>
This commit is contained in:
@ -75,7 +75,7 @@ impl MagickWand {
|
||||
angle: f64,
|
||||
text: &str,
|
||||
) -> Result<(), &'static str> {
|
||||
let c_string = try!(CString::new(text).map_err(|_| "could not convert to cstring"));
|
||||
let c_string = CString::new(text).map_err(|_| "could not convert to cstring")?;
|
||||
match unsafe {
|
||||
bindings::MagickAnnotateImage(
|
||||
self.wand,
|
||||
@ -841,11 +841,11 @@ impl MagickWand {
|
||||
|
||||
impl fmt::Debug for MagickWand {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
try!(writeln!(f, "MagickWand {{"));
|
||||
try!(writeln!(f, " Exception: {:?}", self.get_exception()));
|
||||
try!(writeln!(f, " IsWand: {:?}", self.is_wand()));
|
||||
try!(self.fmt_string_settings(f, " "));
|
||||
try!(self.fmt_checked_settings(f, " "));
|
||||
writeln!(f, "MagickWand {{")?;
|
||||
writeln!(f, " Exception: {:?}", self.get_exception())?;
|
||||
writeln!(f, " IsWand: {:?}", self.is_wand())?;
|
||||
self.fmt_string_settings(f, " ")?;
|
||||
self.fmt_checked_settings(f, " ")?;
|
||||
writeln!(f, "}}")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user