Skip to content

#23 Update dependencies and add static lifetime to SegmentedBuf...#24

Open
peter-lyons-kehl wants to merge 1 commit intologdna:mainfrom
peter-lyons-kehl:023_dependancies_and_segmented_buf
Open

#23 Update dependencies and add static lifetime to SegmentedBuf...#24
peter-lyons-kehl wants to merge 1 commit intologdna:mainfrom
peter-lyons-kehl:023_dependancies_and_segmented_buf

Conversation

@peter-lyons-kehl
Copy link
Copy Markdown
Contributor

For #23

Copy link
Copy Markdown
Contributor

@c-nixon c-nixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

I'd rather not restrict T: 'static if we can avoid it. I have another suggestion for it

Comment thread src/segmented_buffer.rs
// TODO: expose size when const generics become available
#[derive(PartialEq)]
pub struct SegmentedBuf<T> {
pub struct SegmentedBuf<T: 'static> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I had a look at the countme code and it looks like we can avoid this by explicitly setting

_c: countme::Count<SegmentedBuf<T>>

rather than using Self

Copy link
Copy Markdown
Contributor Author

@peter-lyons-kehl peter-lyons-kehl May 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I get the same error with _c: countme::Count<SegmentedBuf<T>>:
image
(That was after reverting the rest of source code to current main except for Cargo.toml. Same error with either stable Rust 1.61.0 or v1.63.0-nightly).

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.

2 participants