Skip to content

Commit

Permalink
package: fix updated clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnamara committed Aug 2, 2024
1 parent 959214f commit 4bb6b9c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
17 changes: 9 additions & 8 deletions src/chart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ impl Chart {
/// # Parameters
///
/// - `rotation`: The rotation of the first segment of a Pie/Doughnut chart.
/// The range is 0 <= rotation <= 360 and the default is 0.
/// The range is 0 <= rotation <= 360 and the default is 0.
///
///
/// # Examples
Expand Down Expand Up @@ -1881,7 +1881,8 @@ impl Chart {
///
/// Output file:
///
/// <img src="https://rustxlsxwriter.github.io/images/chart_set_rotation.png">
/// <img
/// src="https://rustxlsxwriter.github.io/images/chart_set_rotation.png">
///
pub fn set_rotation(&mut self, rotation: u16) -> &mut Chart {
if (0..=360).contains(&rotation) {
Expand Down Expand Up @@ -7950,12 +7951,12 @@ impl ChartSeries {
/// # Parameters
///
/// - `overlap`: Overlap percentage of columns in Bar/Column charts. The
/// range is -100 <= overlap <= 100 and the default is 0.
/// range is -100 <= overlap <= 100 and the default is 0.
///
/// # Examples
///
/// an example of setting the chart series gap and overlap. Note that it only
/// needs to be applied to one of the series in the chart.
/// an example of setting the chart series gap and overlap. Note that it
/// only needs to be applied to one of the series in the chart.
///
/// ```
/// # // This code is available in examples/doc_chart_series_set_overlap.rs
Expand Down Expand Up @@ -8020,7 +8021,7 @@ impl ChartSeries {
/// # Parameters
///
/// - `gap`: Gap percentage of columns in Bar/Column charts. The range is 0
/// <= gap <= 500 and the default is 150.
/// <= gap <= 500 and the default is 150.
///
/// See the example for [`series.set_overlap()`](ChartSeries::set_overlap)
/// above.
Expand Down Expand Up @@ -13951,8 +13952,8 @@ impl ChartLine {
/// # Parameters
///
/// - `width`: The width should be specified in increments of 0.25 of a
/// point as in Excel. The width can be an number type that convert [`Into`]
/// [`f64`].
/// point as in Excel. The width can be an number type that convert
/// [`Into`] [`f64`].
///
/// # Examples
///
Expand Down
2 changes: 1 addition & 1 deletion src/sparkline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ impl Sparkline {
/// # Parameters
///
/// - `weight`: The weight/width of the sparkline line. The width can be an
/// number type that convert [`Into`] [`f64`]. The default is 0.75.
/// number type that convert [`Into`] [`f64`]. The default is 0.75.
///
pub fn set_line_weight<T>(mut self, weight: T) -> Sparkline
where
Expand Down
4 changes: 2 additions & 2 deletions src/tutorial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ instance and format them with an Excel number format.
> **Reading ahead**:
> If you enable the `chrono` feature in `rust_xlsxwriter` you can also use
[`chrono::NaiveDateTime`], [`chrono::NaiveDate`] or [`chrono::NaiveTime`]
instances.
> [`chrono::NaiveDateTime`], [`chrono::NaiveDate`] or [`chrono::NaiveTime`]
> instances.
[`chrono::NaiveDate`]:
https://docs.rs/chrono/latest/chrono/naive/struct.NaiveDate.html
Expand Down
5 changes: 3 additions & 2 deletions src/worksheet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5039,7 +5039,7 @@ impl Worksheet {
/// - [`XlsxError::RowColumnLimitError`] - Row or column exceeds Excel's
/// worksheet limits.
/// - [`XlsxError::ChartError`] - A general error that is raised when a
/// chart parameter is incorrect or a chart is configured incorrectly.
/// chart parameter is incorrect or a chart is configured incorrectly.
///
/// # Parameters
///
Expand Down Expand Up @@ -5086,7 +5086,8 @@ impl Worksheet {
///
/// Output file:
///
/// <img src="https://rustxlsxwriter.github.io/images/worksheet_insert_chart_with_offset.png">
/// <img
/// src="https://rustxlsxwriter.github.io/images/worksheet_insert_chart_with_offset.png">
///
pub fn insert_chart_with_offset(
&mut self,
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/bootstrap07.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn create_new_xlsx_file_3(filename: &str) -> Result<(), XlsxError> {

worksheet.write(0, 0, "Hello")?;
worksheet.write(1, 0, "World".to_string())?;
worksheet.write(2, 0, &"Hello".to_string())?;
worksheet.write(2, 0, "Hello".to_string())?;
worksheet.write(3, 0, std::borrow::Cow::from("World"))?;

workbook.save(filename)?;
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/shared_strings01.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn create_new_xlsx_file(filename: &str) -> Result<(), XlsxError> {
let worksheet = workbook.add_worksheet();

for i in 0u8..127 {
worksheet.write_string(i as u32, 0, &(i as char).to_string())?;
worksheet.write_string(i as u32, 0, (i as char).to_string())?;
}

workbook.save(filename)?;
Expand Down

0 comments on commit 4bb6b9c

Please sign in to comment.