-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(libflux): build on rust 1.78 #5484
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[package] | ||
name = "flux-core" | ||
version = "0.154.0" | ||
rust-version = "1.68" | ||
authors = ["Flux Team <[email protected]>"] | ||
edition = "2021" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1314,7 +1314,7 @@ fn collect_record(record: &Record) -> (RefMonoTypeVecMap<'_, RecordLabel>, Optio | |
|
||
let mut fields = record.fields(); | ||
for field in &mut fields { | ||
a.entry(&field.k).or_insert_with(Vec::new).push(&field.v); | ||
a.entry(&field.k).or_default().push(&field.v); | ||
} | ||
(a, fields.tail()) | ||
} | ||
|
@@ -1804,7 +1804,7 @@ impl PartialEq<&str> for Label { | |
|
||
impl PartialOrd for Label { | ||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> { | ||
self.0.name().partial_cmp(other.0.name()) | ||
Some(self.cmp(other)) | ||
} | ||
} | ||
|
||
|
@@ -1955,10 +1955,10 @@ impl<T> Function<T> { | |
self.opt.len() + self.req.len() + self.pipe.is_some() as usize | ||
} | ||
|
||
pub(crate) fn parameter<Q: ?Sized>(&self, key: &Q) -> Option<&T> | ||
pub(crate) fn parameter<Q>(&self, key: &Q) -> Option<&T> | ||
where | ||
String: Borrow<Q> + Ord, | ||
Q: Ord, | ||
Q: Ord + ?Sized, | ||
{ | ||
self.req | ||
.get(key) | ||
|
@@ -2189,8 +2189,10 @@ impl Function { | |
pub(crate) trait TypeLike { | ||
type Error; | ||
fn typ(&self) -> &MonoType; | ||
#[allow(dead_code)] | ||
fn into_type(self) -> MonoType; | ||
fn error(&self, error: Error) -> Self::Error; | ||
#[allow(dead_code)] | ||
fn location(&self) -> crate::ast::SourceLocation; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason to keep these methods around in the trait definition if they're not used anywhere? I have zero context for this trait, so feel free to ignore me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mainly because I didn't want to mess with the code any more than I have to. I don't really know much about how this library works, other than it having a scarily brittle build process for interfacing with the go part of the system. |
||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[package] | ||
name = "flux" | ||
version = "0.154.0" | ||
rust-version = "1.68" | ||
authors = ["Flux Team <[email protected]>"] | ||
edition = "2021" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errrrrrrrr this says 1.68 but the PR title says 1.78?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH WAIT this is msrv isn't it, i thought i was looking at rust-toolchain.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version that we build with (from
rust-toolchain.toml
) is 1.68. I didn't really want to change that. As I understand it this sets the minimum supported version for the crate. Though we build with 1.68 it seems others are building influxdb with newer versions (#5479) so we want to support those too.