Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey authored Dec 2, 2024
2 parents 8a0dbe8 + 9f2f2b8 commit 31dd1b9
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 120 deletions.
139 changes: 34 additions & 105 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ tokio = {version = "1", features = ["macros", "rt", "rt-multi-thread", "time"] }
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.8"
hyper = "0.14"
failure = "0.1"
anyhow = "1"
thiserror = "2"
lazy_static = "1"
env_logger = "0.8"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,9 @@ See also [A comparison of operating systems written in Rust](https://github.com/

* [ashvardanian/stringzilla](https://github.com/ashvardanian/StringZilla) - SIMD-accelerated string search, sort, edit distances, alignments, and generators for x86 AVX2 & AVX-512, and Arm NEON [![crates.io](https://img.shields.io/crates/v/stringzilla.svg)](https://crates.io/crates/stringzilla)
* [cchexcode/complate](https://github.com/cchexcode/complate) - An in-terminal text templating tool designed for standardizing messages (like for GIT commits). [![crates.io](https://img.shields.io/crates/v/complate.svg)](https://crates.io/crates/complate) [![crates.io](https://img.shields.io/crates/d/complate?label=crates.io%20downloads)](https://crates.io/crates/complate) [![build badge](https://github.com/cchexcode/complate/workflows/pipeline/badge.svg?branch=master)](https://github.com/cchexcode/complate/actions)
* [dathere/qsv](https://github.com/dathere/qsv) [[qsv](https://crates.io/crates/qsv)] - A high performance CSV data-wrangling toolkit. Forked from xsv, with 34+ additional commands & more. [![Linux build status](https://github.com/dathere/qsv/actions/workflows/rust.yml/badge.svg)](https://github.com/dathere/qsv/actions/workflows/rust.yml) [![Windows build status](https://github.com/dathere/qsv/actions/workflows/rust-windows.yml/badge.svg)](https://github.com/dathere/qsv/actions/workflows/rust-windows.yml) [![macOS build status](https://github.com/dathere/qsv/actions/workflows/rust-macos.yml/badge.svg)](https://github.com/dathere/qsv/actions/workflows/rust-macos.yml)
* [dominikwilkowski/cfonts](https://github.com/dominikwilkowski/cfonts) [[cfonts](https://crates.io/crates/cfonts)] - Sexy ANSI fonts for the console ![build badge](https://github.com/dominikwilkowski/cfonts/actions/workflows/testing.yml/badge.svg)
* [grex](https://github.com/pemistahl/grex) - A command-line tool and library for generating regular expressions from user-provided test cases
* [jqnatividad/qsv](https://github.com/jqnatividad/qsv) [[qsv](https://crates.io/crates/qsv)] - A high performance CSV data-wrangling toolkit. Forked from xsv, with 34+ additional commands & more. [![Linux build status](https://github.com/jqnatividad/qsv/actions/workflows/rust.yml/badge.svg)](https://github.com/jqnatividad/qsv/actions/workflows/rust.yml) [![Windows build status](https://github.com/jqnatividad/qsv/actions/workflows/rust-windows.yml/badge.svg)](https://github.com/jqnatividad/qsv/actions/workflows/rust-windows.yml) [![macOS build status](https://github.com/jqnatividad/qsv/actions/workflows/rust-macos.yml/badge.svg)](https://github.com/jqnatividad/qsv/actions/workflows/rust-macos.yml)
* [Lisprez/so_stupid_search](https://github.com/Lisprez/so_stupid_search) - A simple and fast string search tool for human beings
* [Melody](https://github.com/yoav-lavi/melody) - A language that compiles to regular expressions and aims to be more easily readable and maintainable [![build badge](https://github.com/yoav-lavi/melody/actions/workflows/rust.yml/badge.svg)](https://github.com/yoav-lavi/melody/actions/workflows/rust.yml) [![crates.io](https://img.shields.io/crates/v/melody_compiler?label=compiler)](https://crates.io/crates/melody_compiler)
* [phiresky/ripgrep-all](https://github.com/phiresky/ripgrep-all) - ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
Expand Down
9 changes: 5 additions & 4 deletions src/bin/hacktoberfest.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Helper tool to dump all repos in awesome-rust that are tagged with "hacktoberfest"

use anyhow::{format_err, Result};
use chrono::{DateTime, Duration, Local};
use failure::{format_err, Error, Fail};
use futures::future::{select_all, BoxFuture, FutureExt};
use lazy_static::lazy_static;
use log::{debug, warn};
Expand All @@ -16,12 +16,13 @@ use std::fs;
use std::io::Write;
use std::time;
use std::u8;
use thiserror::Error;
use tokio::sync::Semaphore;
use tokio::sync::SemaphorePermit;

#[derive(Debug, Fail, Serialize, Deserialize)]
#[derive(Debug, Error, Serialize, Deserialize)]
enum CheckerError {
#[fail(display = "http error: {}", status)]
#[error("http error: {}", status)]
HttpError {
status: u16,
location: Option<String>,
Expand Down Expand Up @@ -150,7 +151,7 @@ struct Link {
type Results = BTreeMap<String, Link>;

#[tokio::main]
async fn main() -> Result<(), Error> {
async fn main() -> Result<()> {
env_logger::init();
let markdown_input = fs::read_to_string("README.md").expect("Can't read README.md");
let parser = Parser::new(&markdown_input);
Expand Down
19 changes: 10 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(warnings)]

use anyhow::{format_err, Result};
use chrono::{DateTime, Duration, Local};
use diffy::create_patch;
use failure::{format_err, Error, Fail};
use futures::future::{select_all, BoxFuture, FutureExt};
use lazy_static::lazy_static;
use log::{debug, info, warn};
Expand All @@ -16,6 +16,7 @@ use std::io::Write;
use std::time;
use std::u8;
use std::{cmp::Ordering, fs};
use thiserror::Error;
use tokio::sync::Semaphore;
use tokio::sync::SemaphorePermit;

Expand Down Expand Up @@ -75,27 +76,27 @@ lazy_static! {
];
}

#[derive(Debug, Fail, Serialize, Deserialize)]
#[derive(Debug, Error, Serialize, Deserialize)]
enum CheckerError {
#[fail(display = "failed to try url")]
#[error("failed to try url")]
NotTried, // Generally shouldn't happen, but useful to have

#[fail(display = "http error: {}", status)]
#[error("http error: {status}")]
HttpError {
status: u16,
location: Option<String>,
},

#[fail(display = "too many requests")]
#[error("too many requests")]
TooManyRequests,

#[fail(display = "reqwest error: {}", error)]
#[error("reqwest error: {error}")]
ReqwestError { error: String },

#[fail(display = "travis build is unknown")]
#[error("travis build is unknown")]
TravisBuildUnknown,

#[fail(display = "travis build image with no branch")]
#[error("travis build image with no branch")]
TravisBuildNoBranch,
}

Expand Down Expand Up @@ -398,7 +399,7 @@ struct PopularityData {
}

#[tokio::main]
async fn main() -> Result<(), Error> {
async fn main() -> Result<()> {
env_logger::init();
let markdown_input = fs::read_to_string("README.md").expect("Can't read README.md");
let parser = Parser::new(&markdown_input);
Expand Down

0 comments on commit 31dd1b9

Please sign in to comment.