Skip to content

Commit

Permalink
Cargo format and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchane committed Oct 26, 2023
1 parent c7b1677 commit e47b2e5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/references.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ impl ReferenceSignatures {
config: &tracker::Config,
) -> Result<Self> {
let mut signatures: HashMap<Arc<TicketQuery>, Vec<String>> = HashMap::new();
Self::store(&mut signatures, ref_bugs, &config)?;
Self::store(&mut signatures, ref_issues, &config)?;
Self::store(&mut signatures, ref_bugs, config)?;
Self::store(&mut signatures, ref_issues, config)?;

// For each ticket, sort its references alphabetically.
// Otherwise, the order changes based on the response from the ticket tracker,
Expand Down
2 changes: 1 addition & 1 deletion src/status_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ fn combined_releases(tickets: &[AbstractTicket]) -> Vec<&str> {
// Releases are a list, and each ticket can have several of them.
// Update the counter with the values in the lists, rather than
// with the lists themselves as values.
for ticket in tickets.iter() {
for ticket in tickets {
releases.update(ticket.target_releases.iter().map(String::as_str));
}

Expand Down
2 changes: 1 addition & 1 deletion src/templating.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ pub fn format_document(
// Initializing with 0 rather than relying on each ticket's `entry` call
// is necessary for tickets that end up unused, because they wouldn't
// call `entry` at all, and would report nothing.
for ticket in tickets.iter() {
for ticket in tickets {
ticket_stats.insert(Rc::clone(&ticket.id), 0);
}

Expand Down
6 changes: 5 additions & 1 deletion src/ticket_abstraction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ impl IntoAbstract for Issue {
// However, the project as a whole can be public or private, which affects the ticket visibility.
// All projects are considered public unless you configure them in `JiraInstance::private_projects`.
public: {
self.fields.security.is_none() && !config.jira.private_projects.contains(&self.fields.project.key)
self.fields.security.is_none()
&& !config
.jira
.private_projects
.contains(&self.fields.project.key)
},
references,
};
Expand Down
8 changes: 4 additions & 4 deletions src/tracker_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ pub async fn unsorted_tickets(
let mut annotated_tickets = Vec::new();
annotated_tickets.append(&mut into_annotated_tickets(
plain_bugs,
&trackers,
trackers,
&ref_signatures,
)?);
annotated_tickets.append(&mut into_annotated_tickets(
plain_issues,
&trackers,
trackers,
&ref_signatures,
)?);

Expand Down Expand Up @@ -311,7 +311,7 @@ async fn bugs_from_searches(
) -> Result<Vec<(Arc<TicketQuery>, Bug)>> {
let mut annotated_bugs: Vec<(Arc<TicketQuery>, Bug)> = Vec::new();

for (search, query) in queries.iter() {
for (search, query) in queries {
let mut bugs = bz_instance
.search(search)
// This enables the download concurrency:
Expand Down Expand Up @@ -405,7 +405,7 @@ async fn issues_from_searches(
) -> Result<Vec<(Arc<TicketQuery>, Issue)>> {
let mut annotated_issues: Vec<(Arc<TicketQuery>, Issue)> = Vec::new();

for (search, query) in queries.iter() {
for (search, query) in queries {
let mut issues = jira_instance
.search(search)
// This enables the download concurrency:
Expand Down

0 comments on commit e47b2e5

Please sign in to comment.