pub fn compare_to(a: &str, b: &str, operator: &CompOp) -> Result<bool, ()> {
        // Create version instances
        let a_ver = Version::from(a);
        let b_ver = Version::from(b);

        // Both version numbers must have been parsed
        if a_ver.is_none() || b_ver.is_none() {
            return Err(());
        }

        // Compare and return the result
        Ok(a_ver.unwrap().compare_to(&b_ver.unwrap(), &operator))
    }
/// Compare two version number strings to each other and check whether the given comparison
/// `operator` is valid.
///
/// The two given version numbers must be valid, or an error will be returned.
///
/// # Examples
///
/// ```
/// use version_compare::{CompOp, VersionCompare};
///
/// // Compare version numbers
/// assert!(VersionCompare::compare_to("1.2.3", "1.2.3", &CompOp::Eq).unwrap());
/// assert!(VersionCompare::compare_to("1.2.3", "1.2.3", &CompOp::Le).unwrap());
/// assert!(VersionCompare::compare_to("1.2.3", "1.2.4", &CompOp::Lt).unwrap());
/// assert!(VersionCompare::compare_to("1", "0.1", &CompOp::Gt).unwrap());
/// assert!(VersionCompare::compare_to("1", "0.1", &CompOp::Ge).unwrap());
/// ```
Compare two version number strings to each other and check whether the given comparison
`operator` is valid.

The two given version numbers must be valid, or an error will be returned.
Compare two version number strings to each other and check whether the given comparison ` operator ` is valid . The two given version numbers must be valid or an error will be returned .
pub fn compare_to(a: &str, b: &str, operator: &CompOp) -> Result<bool, ()> {
        // Create version instances
        let a_ver = Version::from(a);
        let b_ver = Version::from(b);
        // Both version numbers must have been parsed
        if a_ver.is_none() || b_ver.is_none() {
            return Err(());
        }
        // Compare and return the result
        Ok(a_ver.unwrap().compare_to(&b_ver.unwrap(), &operator))
    }
pub fn compare_to ( a : & str , b : & str , operator : & CompOp ) -> Result < bool , ( ) > { // Create version instances let a_ver = Version :: from ( a ) ; let b_ver = Version :: from ( b ) ; // Both version numbers must have been parsed if a_ver . is_none ( ) || b_ver . is_none ( ) { return Err ( ( ) ) ; } // Compare and return the result Ok ( a_ver . unwrap ( ) . compare_to ( & b_ver . unwrap ( ) , & operator ) ) }
Compare two version number strings to each other and check whether the given comparison
`operator` is valid.
Compare two version number strings to each other and check whether the given comparison ` operator ` is valid .
a
&str
b
&str
operator
&CompOp
a
&str
b
&str
operator
&CompOp
examples
```
use version_compare::{CompOp, VersionCompare}.


` ` ` use version_compare :: { CompOp VersionCompare } .