Skip to content
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 clippy::doc_lazy_continuation lints #395

Merged
merged 5 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ diagnostic error code: ruget::api::bad_json
" />

> **NOTE: You must enable the `"fancy"` crate feature to get fancy report
output like in the screenshots above.** You should only do this in your
toplevel crate, as the fancy feature pulls in a number of dependencies that
libraries and such might not want.
> output like in the screenshots above.** You should only do this in your
> toplevel crate, as the fancy feature pulls in a number of dependencies that
> libraries and such might not want.

### Table of Contents <!-- omit in toc -->

Expand Down Expand Up @@ -288,9 +288,9 @@ There are also similar [bail!] and [ensure!] macros.
automatically.

> **NOTE:** You must enable the `"fancy"` crate feature to get fancy report
output like in the screenshots here.** You should only do this in your
toplevel crate, as the fancy feature pulls in a number of dependencies that
libraries and such might not want.
> output like in the screenshots here.** You should only do this in your
> toplevel crate, as the fancy feature pulls in a number of dependencies that
> libraries and such might not want.

```rust
use miette::{IntoDiagnostic, Result};
Expand Down Expand Up @@ -645,8 +645,8 @@ customize!
If you...
- ...don't know all the possible errors upfront
- ...need to serialize/deserialize errors
then you may want to use [`miette!`], [`diagnostic!`] macros or
[`MietteDiagnostic`] directly to create diagnostic on the fly.
then you may want to use [`miette!`], [`diagnostic!`] macros or
[`MietteDiagnostic`] directly to create diagnostic on the fly.

```rust

Expand Down
16 changes: 8 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
//! " />
//!
//! > **NOTE: You must enable the `"fancy"` crate feature to get fancy report
//! output like in the screenshots above.** You should only do this in your
//! toplevel crate, as the fancy feature pulls in a number of dependencies that
//! libraries and such might not want.
//! > output like in the screenshots above.** You should only do this in your
//! > toplevel crate, as the fancy feature pulls in a number of dependencies that
//! > libraries and such might not want.
//!
//! ## Table of Contents <!-- omit in toc -->
//!
Expand Down Expand Up @@ -288,9 +288,9 @@
//! automatically.
//!
//! > **NOTE:** You must enable the `"fancy"` crate feature to get fancy report
//! output like in the screenshots here.** You should only do this in your
//! toplevel crate, as the fancy feature pulls in a number of dependencies that
//! libraries and such might not want.
//! > output like in the screenshots here.** You should only do this in your
//! > toplevel crate, as the fancy feature pulls in a number of dependencies that
//! > libraries and such might not want.
//!
//! ```rust
//! use miette::{IntoDiagnostic, Result};
Expand Down Expand Up @@ -645,8 +645,8 @@
//! If you...
//! - ...don't know all the possible errors upfront
//! - ...need to serialize/deserialize errors
//! then you may want to use [`miette!`], [`diagnostic!`] macros or
//! [`MietteDiagnostic`] directly to create diagnostic on the fly.
//! then you may want to use [`miette!`], [`diagnostic!`] macros or
//! [`MietteDiagnostic`] directly to create diagnostic on the fly.
//!
//! ```rust,ignore
//! # use miette::{miette, LabeledSpan, Report};
Expand Down
6 changes: 3 additions & 3 deletions tests/graphical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2000,11 +2000,11 @@ fn syntax_highlighter_on_real_file() {
// SourceSpan constants for column and length
const CO: usize = 28;
const LEN: usize = 27;
let file_src = std::fs::read_to_string(&filename).unwrap();
let file_src = std::fs::read_to_string(filename).unwrap();
let offset = miette::SourceOffset::from_location(&file_src, line, CO);
let err = Test {
src: NamedSource::new(&filename, file_src.clone()),
src_span: SourceSpan::new(offset, LEN.into()),
src: NamedSource::new(filename, file_src.clone()),
src_span: SourceSpan::new(offset, LEN),
};

let mut out = String::new();
Expand Down
2 changes: 2 additions & 0 deletions tests/test_diagnostic_source_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ fn test_diagnostic_source_is_output() {
assert_eq!(expected, out);
}

#[cfg(feature = "fancy-no-backtrace")]
#[derive(Debug, miette::Diagnostic, thiserror::Error)]
#[error("A nested error happened")]
struct NestedError {
Expand Down Expand Up @@ -212,6 +213,7 @@ fn test_nested_diagnostic_source_is_output() {
assert_eq!(expected, out);
}

#[cfg(feature = "fancy-no-backtrace")]
#[derive(Debug, miette::Diagnostic, thiserror::Error)]
#[error("A multi-error happened")]
struct MultiError {
Expand Down
1 change: 0 additions & 1 deletion tests/test_fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ fn test_altdisplay() {

#[test]
#[ignore = "not really gonna work with the current printers"]
#[cfg_attr(track_caller, ignore)]
fn test_debug() {
assert_eq!(EXPECTED_DEBUG_F, format!("{:?}", f().unwrap_err()));
assert_eq!(EXPECTED_DEBUG_G, format!("{:?}", g().unwrap_err()));
Expand Down
Loading