Skip to content

upgrade the lower bound for termcolor from 1.1.0 to 1.4.0#3308

Open
alexanderkjall wants to merge 1 commit intoBurntSushi:masterfrom
alexanderkjall:update-termcolor
Open

upgrade the lower bound for termcolor from 1.1.0 to 1.4.0#3308
alexanderkjall wants to merge 1 commit intoBurntSushi:masterfrom
alexanderkjall:update-termcolor

Conversation

@alexanderkjall
Copy link
Copy Markdown

If you try to build it with a lower version, it fails, for example like this with 1.3.0:

error[E0599]: the method `clone` exists for struct `SearchWorker<Buffer>`, but its trait bounds were not satisfied
    --> crates/core/main.rs:181:37
     |
 181 |         let mut searcher = searcher.clone();
     |                                     ^^^^^ method cannot be called on `SearchWorker<Buffer>` due to unsatisfied trait bounds
     |
    ::: crates/core/search.rs:230:1
     |
 230 | pub(crate) struct SearchWorker<W> {
     | --------------------------------- method `clone` not found for this struct because it doesn't satisfy `SearchWorker<Buffer>: Clone`
     |
    ::: /home/capitol/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/termcolor-1.3.0/src/lib.rs:1183:1
     |
1183 | pub struct Buffer(BufferInner);
     | ----------------- doesn't satisfy `Buffer: Clone`
     |
note: trait bound `Buffer: Clone` was not satisfied
    --> crates/core/search.rs:229:10
     |
 229 | #[derive(Clone, Debug)]
     |          ^^^^^ unsatisfied trait bound introduced in this `derive` macro
     = help: items from traits can only be used if the trait is implemented and in scope
     = note: the following trait defines an item `clone`, perhaps you need to implement it:
             candidate #1: `Clone`

error[E0282]: type annotations needed
   --> crates/core/main.rs:190:17
    |
190 |             let search_result = match searcher.search(&haystack) {
    |                 ^^^^^^^^^^^^^
...
197 |             if search_result.has_match() {
    |                ------------- type must be known at this point
    |
help: consider giving `search_result` an explicit type
    |
190 |             let search_result: /* Type */ = match searcher.search(&haystack) {
    |                              ++++++++++++

from: https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/ripgrep/debian/patches/bump-termcolor.diff?ref_type=heads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant