Skip to main content

check

Function check 

Source
pub fn check(
    crate_name: impl Into<String>,
    current_version: impl Into<String>,
) -> Result<Option<UpdateInfo>, Error>
Expand description

Convenience function to check for updates with default settings.

§Example

if let Ok(Some(update)) = tiny_update_check::check("my-crate", "1.0.0") {
    eprintln!("Update available: {} -> {}", update.current, update.latest);
}

§Errors

Returns an error if the update check fails.