Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Aug 3, 2024
1 parent 1e20ac8 commit ec7dad5
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions Source/Fn/Summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub async fn Fn(
let Name = Repository.tag_names(None)?;

let mut Date: Vec<(String, DateTime<FixedOffset>)> = Name
.iter()
.par_iter()

Check failure on line 49 in Source/Fn/Summary.rs

View workflow job for this annotation

GitHub Actions / Build (stable)

the method `par_iter` exists for struct `StringArray`, but its trait bounds were not satisfied
.filter_map(|Tag| {
Tag.and_then(|Tag| {

Check failure on line 51 in Source/Fn/Summary.rs

View workflow job for this annotation

GitHub Actions / Build (stable)

the size for values of type `str` cannot be known at compilation time
Repository
Expand Down Expand Up @@ -86,33 +86,33 @@ pub async fn Fn(
let OptionClone = Option.clone();

Queue.push(tokio::spawn(async move {
ApprovalClone.lock().await.send((
"🗣️ Summary from first commit to last commit".to_string(),
crate::Fn::Summary::Difference::Fn(&RepositoryClone, &First, &Last, OptionClone)?,
))?;

let Summary =
crate::Fn::Summary::Difference::Fn(&RepositoryClone, &First, &Last, &OptionClone)?;
ApprovalClone
.lock()
.await
.send(("🗣️ Summary from first commit to last commit".to_string(), Summary))?;
Ok::<(), Box<dyn std::error::Error + Send + Sync>>(())
}));
} else {
for Window in Tag.windows(2) {
let Start = Window[0];
let End = &Window[1];

let Start = Window[0].clone();
let End = Window[1].clone();
let RepositoryClone = Repository.clone();
let ApprovalClone = Approval.clone();
let OptionClone = Option.clone();

Queue.push(tokio::spawn(async move {
ApprovalClone.lock().await.send((
format!("🗣️ Summary from {} to {}", Start, End),
crate::Fn::Summary::Difference::Fn(
&RepositoryClone,
&Start,
&End,
OptionClone,
)?,
))?;

let Summary = crate::Fn::Summary::Difference::Fn(
&RepositoryClone,
&Start,
&End,
&OptionClone,
)?;
ApprovalClone
.lock()
.await
.send((format!("🗣️ Summary from {} to {}", Start, End), Summary))?;
Ok::<(), Box<dyn std::error::Error + Send + Sync>>(())
}));
}
Expand All @@ -124,16 +124,16 @@ pub async fn Fn(
let OptionClone = Option.clone();

Queue.push(tokio::spawn(async move {
ApprovalClone.lock().await.send((
format!("🗣️ Summary from first commit to {}", Latest),
crate::Fn::Summary::Difference::Fn(
&RepositoryClone,
&First,
&Latest,
OptionClone,
)?,
))?;

let Summary = crate::Fn::Summary::Difference::Fn(
&RepositoryClone,
&First,
&Latest,
&OptionClone,
)?;
ApprovalClone
.lock()
.await
.send((format!("🗣️ Summary from first commit to {}", Latest), Summary))?;
Ok::<(), Box<dyn std::error::Error + Send + Sync>>(())
}));

Expand All @@ -142,16 +142,16 @@ pub async fn Fn(
let OptionClone = Option.clone();

Queue.push(tokio::spawn(async move {
ApprovalClone.lock().await.send((
format!("🗣️ Summary from {} to last commit", Latest),
crate::Fn::Summary::Difference::Fn(
&RepositoryClone,
&Latest,
&Last,
OptionClone,
)?,
))?;

let Summary = crate::Fn::Summary::Difference::Fn(
&RepositoryClone,
&Latest,
&Last,
&OptionClone,
)?;
ApprovalClone
.lock()
.await
.send((format!("🗣️ Summary from {} to last commit", Latest), Summary))?;
Ok::<(), Box<dyn std::error::Error + Send + Sync>>(())
}));
}
Expand All @@ -160,13 +160,13 @@ pub async fn Fn(
drop(Approval);

while let Some(Result) = Queue.next().await {
if let Err(e) = Result {
eprintln!("Task error: {}", e);
if let Err(E) = Result {
eprintln!("Task error: {}", E);
continue;
}

if let Err(e) = Result.unwrap() {
eprintln!("Inner task error: {}", e);
if let Err(E) = Result.unwrap() {
eprintln!("Inner task error: {}", E);
}
}

Expand Down

0 comments on commit ec7dad5

Please sign in to comment.