Hello to all,
I am just relearning Rust in which I am implementing a concrete task.
The task is about renaming RAW images by means of
the exif data of the image.
I search the images with a certain extension and write them sorted
in a list.
Then I iterate over the list and determine for each element the Exif-
data for each element and show the Exif tag <Exif.Image.DateTime> via
So far it works fine. Now I want to get the result of println!()
Ok("2020:02:21 17:00:30"). The attempt to convert this result
into a "normal" string by means of
let zw = exif_datetime[2..];
leads to a compile error:
error[E0608]: cannot index into a value of type `std::result::Result<std::string::String, Rexiv2Error>` --> src/main.rs:42:13 | 42 | let zw = exif_datetime[2..]; | ^^^^^^^^^^^^^^^^^^ error: aborting due to previous error; 1 warning emitted For more information about this error, try `rustc --explain E0608`. error: could not compile `rust_args`.
I have already searched the internet for a solution to this problem, but I have
but did not find anything or did not read it (did not understand it).
Can you please help me?
Thanks for your help and tips.
See you then ...
Sorry for this English, it comes from a translator.