Skip to content

Commit

Permalink
style: fix lints from rust 1.80.0
Browse files Browse the repository at this point in the history
* Also fix doc test markdown errors
  • Loading branch information
molpopgen committed Jul 27, 2024
1 parent edc8ffc commit 7749172
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ repository = "https://github.com/tskit-dev/tskit-rust"
rust-version = "1.71.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints.rust]
# Added for rust 1.80.0
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] }

[profile.release]
lto = "fat"
Expand Down
8 changes: 4 additions & 4 deletions src/table_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl TableCollection {
///
/// Negative sequence lengths are errors:
///
/// ```{should_panic}
/// ```should_panic
/// let tables = tskit::TableCollection::new(-55.0).unwrap();
/// ```
pub fn new<P: Into<Position>>(sequence_length: P) -> Result<Self, TskitError> {
Expand Down Expand Up @@ -1382,10 +1382,10 @@ impl TableCollection {
/// # Return value
/// - `Ok(None)`: when truncation leads to empty edge table.
/// - `Ok(Some(TableCollection))`: when trunction is successfully performed
/// and results in non-empty edge table. The table collection is sorted.
/// and results in non-empty edge table. The table collection is sorted.
/// - `Error(TskitError)`: Any errors from the C API propagate. An
/// [TskitError::RangeError] will occur when `intervals` are not
/// sorted.
/// [TskitError::RangeError] will occur when `intervals` are not
/// sorted.
///
/// # Notes
///
Expand Down
8 changes: 4 additions & 4 deletions src/trees/treeseq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl TreeSequence {
///
/// A `Tree`'s lifetime is tied to that of its tree sequence:
///
/// ```{compile_fail}
/// ```compile_fail
/// # use streaming_iterator::StreamingIterator;
/// # use streaming_iterator::DoubleEndedStreamingIterator;
/// # let mut tables = tskit::TableCollection::new(1000.).unwrap();
Expand Down Expand Up @@ -368,10 +368,10 @@ impl TreeSequence {
/// # Return value
/// - `Ok(None)`: when truncation leads to empty edge table.
/// - `Ok(Some(TableCollection))`: when trunction is successfully performed
/// and results in non-empty edge table. The tables are sorted.
/// and results in non-empty edge table. The tables are sorted.
/// - `Error(TskitError)`: Any errors from the C API propagate. An
/// [TskitError::RangeError] will occur when `intervals` are not
/// sorted.
/// [TskitError::RangeError] will occur when `intervals` are not
/// sorted.
///
/// # Notes
///
Expand Down

0 comments on commit 7749172

Please sign in to comment.