Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions robocodec-cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

//! CLI utilities for the robocodec command-line interface.

use robocodec::RoboReader;

pub mod output;
pub mod progress;
pub mod time;
Expand All @@ -18,9 +20,9 @@ pub use time::{format_duration, format_timestamp, parse_time_range};
///
/// Convenience wrapper around `RoboReader::open` that provides better
/// error messages for invalid paths.
pub fn open_reader(path: &std::path::Path) -> Result<robocodec::RoboReader> {
pub fn open_reader(path: &std::path::Path) -> Result<RoboReader> {
let path_str = path
.to_str()
.ok_or_else(|| anyhow::anyhow!("Invalid UTF-8 path: {:?}", path))?;
Ok(robocodec::RoboReader::open(path_str)?)
Ok(RoboReader::open(path_str)?)
}
Loading