Skip to content

Commit

Permalink
doc: fix rustdoc examples, add use statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoverth committed May 1, 2024
1 parent dd11caf commit 8e96205
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ impl error::Error for Errors {}
/// ## Example:
///
/// ```
/// use ctow::convert;
///
/// let input = "curl -H 'User-Agent: Mozilla...'";
/// let wget = convert(&[input.to_string()]);
/// ```
Expand Down Expand Up @@ -84,11 +86,13 @@ pub fn convert(curl: &[String]) -> Result<String, Errors> {
Ok("wget ".to_owned() + &wget_args.join(" "))
}

/// converts a curl argument to a wget argument
/// Converts a curl argument to a wget argument
///
/// ## Example
///
/// ```
/// use ctow::convert_arg;
///
/// let curl_argument = "-H 'User-Agent: Mozilla...'";
/// let wget_argument = convert_arg(curl_argument);
/// ```
Expand Down

0 comments on commit 8e96205

Please sign in to comment.