kornelski / rust-rgb

struct RGB for sharing pixels between crates
https://lib.rs/rgb
MIT License
97 stars 19 forks source link

Add back legacy behaviour #100

Closed ripytide closed 2 months ago

ripytide commented 2 months ago

To be reviewed after #99

This adds back all the legacy functionality excluding the traits which can be left in v0.8 due to the orphan rules.

It passes cargo-semver-checks:

❯ cargo semver-checks --release-type minor --all-features
     Parsing rgb v0.9.0 (current)
      Parsed [   0.830s] (current)
     Parsing rgb v0.8.37 (baseline, cached)
      Parsed [   0.069s] (baseline)
    Checking rgb v0.8.37 -> v0.9.0 (assume minor change)
     Checked [   0.012s] 69 checks; 68 passed, 1 failed, 6 unnecessary

--- failure trait_missing: pub trait removed or renamed ---

Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.32.0/src/lints/trait_missing.ron

Failed in:
  trait rgb::ComponentSlice, previously in file /home/ripytide/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rgb-0.8.37/src/internal/pixel.rs:3
  trait rgb::AsPixels, previously in file /home/ripytide/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rgb-0.8.37/src/internal/convert/mod.rs:15
  trait rgb::ComponentBytes, previously in file /home/ripytide/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rgb-0.8.37/src/internal/pixel.rs:37
  trait rgb::FromSlice, previously in file /home/ripytide/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rgb-0.8.37/src/internal/convert/mod.rs:69
  trait rgb::ComponentMap, previously in file /home/ripytide/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rgb-0.8.37/src/internal/pixel.rs:70
  trait rgb::ColorComponentMap, previously in file /home/ripytide/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rgb-0.8.37/src/internal/pixel.rs:79
     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [   0.925s] rgb
ripytide commented 2 months ago

Applied in #102