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

Improve CI #2162

Merged
merged 3 commits into from
Aug 8, 2023
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
12 changes: 12 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,15 @@ jobs:
- name: Check dependency tables
run: |
cargo sort --workspace --grouped --check

typos:
name: Spell Check with Typos
runs-on: ubuntu-latest
if: github.event_name == 'push' || !github.event.pull_request.draft

steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3

- name: Check the spelling of the files in our repo
uses: crate-ci/[email protected]
4 changes: 4 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[default.extend-identifiers]
# Typos in previous type names, mentioned in changelog
DefaultOnFailedUpdgrade = "DefaultOnFailedUpdgrade"
OnFailedUpdgrade = "OnFailedUpdgrade"
2 changes: 1 addition & 1 deletion ECOSYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If your project isn't listed here and you would like it to be, please feel free
- [aliri_axum](https://docs.rs/aliri_axum) and [aliri_tower](https://docs.rs/aliri_tower): JWT validation middleware and OAuth2 scopes enforcing extractors.
- [ezsockets](https://github.com/gbaranski/ezsockets): Easy to use WebSocket library that integrates with Axum.
- [axum_session](https://github.com/AscendingCreations/AxumSessions): Database persistent sessions like pythons flask_sessionstore for Axum.
- [axum_session_auth](https://github.com/AscendingCreations/AxumSessionsAuth): Persistant session based user login with rights management for Axum.
- [axum_session_auth](https://github.com/AscendingCreations/AxumSessionsAuth): Persistent session based user login with rights management for Axum.
- [axum-auth](https://crates.io/crates/axum-auth): High-level http auth extractors for axum.
- [axum-keycloak-auth](https://github.com/lpotthast/axum-keycloak-auth): Protect axum routes with a JWT emitted by Keycloak.
- [shuttle](https://github.com/getsynth/shuttle): A serverless platform built for Rust. Now with axum support.
Expand Down
2 changes: 1 addition & 1 deletion axum-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg_attr(nightly_error_messages, feature(rustc_attrs))]
#![cfg_attr(nightly_error_messages, allow(internal_features), feature(rustc_attrs))]
//! Core types and traits for [`axum`].
//!
//! Libraries authors that want to provide [`FromRequest`] or [`IntoResponse`] implementations
Expand Down
2 changes: 1 addition & 1 deletion axum-extra/src/extract/cookie/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl CookieJar {

/// Create a new empty `CookieJar`.
///
/// This is inteded to be used in middleware and other places where it might be difficult to
/// This is intended to be used in middleware and other places where it might be difficult to
/// run extractors. Normally you should create `CookieJar`s through [`FromRequestParts`].
///
/// If you need a jar that contains the headers from a request use `impl From<&HeaderMap> for
Expand Down
2 changes: 1 addition & 1 deletion axum-extra/src/extract/cookie/private.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl PrivateCookieJar {

/// Create a new empty `PrivateCookieJarIter`.
///
/// This is inteded to be used in middleware and other places where it might be difficult to
/// This is intended to be used in middleware and other places where it might be difficult to
/// run extractors. Normally you should create `PrivateCookieJar`s through [`FromRequestParts`].
///
/// [`FromRequestParts`]: axum::extract::FromRequestParts
Expand Down
2 changes: 1 addition & 1 deletion axum-extra/src/extract/cookie/signed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl SignedCookieJar {

/// Create a new empty `SignedCookieJar`.
///
/// This is inteded to be used in middleware and other places where it might be difficult to
/// This is intended to be used in middleware and other places where it might be difficult to
/// run extractors. Normally you should create `SignedCookieJar`s through [`FromRequestParts`].
///
/// [`FromRequestParts`]: axum::extract::FromRequestParts
Expand Down
2 changes: 1 addition & 1 deletion axum-extra/src/extract/multipart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ use std::{
/// ```
///
/// In general you should consume `Multipart` by looping over the fields in order and make sure not
/// to keep `Field`s around from previous loop iterations. That will mimimize the risk of runtime
/// to keep `Field`s around from previous loop iterations. That will minimize the risk of runtime
/// errors.
///
/// # Differences between this and `axum::extract::Multipart`
Expand Down
2 changes: 1 addition & 1 deletion axum-extra/src/handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait HandlerCallWithExtractors<T, S>: Sized {
/// Call the handler with the extracted inputs.
fn call(self, extractors: T, state: S) -> <Self as HandlerCallWithExtractors<T, S>>::Future;

/// Conver this `HandlerCallWithExtractors` into [`Handler`].
/// Convert this `HandlerCallWithExtractors` into [`Handler`].
fn into_handler(self) -> IntoHandler<Self, T, S> {
IntoHandler {
handler: self,
Expand Down
2 changes: 1 addition & 1 deletion axum-extra/src/routing/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ use serde::Serialize;
///
/// ## Customizing the rejection
///
/// By default the rejection used in the [`FromRequest`] implemetation will be [`PathRejection`].
/// By default the rejection used in the [`FromRequest`] implementation will be [`PathRejection`].
///
/// That can be customized using `#[typed_path("...", rejection(YourType))]`:
///
Expand Down
2 changes: 1 addition & 1 deletion axum/src/docs/extract.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ options:
1. Use `Result<T, T::Rejection>` as your extractor like shown in ["Optional
extractors"](#optional-extractors). This works well if you're only using
the extractor in a single handler.
2. Create your own extractor that in its [`FromRequest`] implemention calls
2. Create your own extractor that in its [`FromRequest`] implementation calls
one of axum's built in extractors but returns a different response for
rejections. See the [customize-extractor-error] example for more details.

Expand Down
4 changes: 2 additions & 2 deletions axum/src/docs/method_routing/layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ more details.
use axum::{routing::get, Router};
use tower::limit::ConcurrencyLimitLayer;

async fn hander() {}
async fn handler() {}

let app = Router::new().route(
"/",
// All requests to `GET /` will be sent through `ConcurrencyLimitLayer`
get(hander).layer(ConcurrencyLimitLayer::new(64)),
get(handler).layer(ConcurrencyLimitLayer::new(64)),
);
# let _: Router = app;
```
2 changes: 1 addition & 1 deletion axum/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg_attr(nightly_error_messages, feature(rustc_attrs))]
#![cfg_attr(nightly_error_messages, allow(internal_features), feature(rustc_attrs))]
//! axum is a web application framework that focuses on ergonomics and modularity.
//!
//! # Table of contents
Expand Down
2 changes: 1 addition & 1 deletion axum/src/response/sse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ mod tests {
}

#[test]
fn memchr_spliting() {
fn memchr_splitting() {
assert_eq!(
memchr_split(2, &[]).collect::<Vec<_>>(),
[&[]] as [&[u8]; 1]
Expand Down
2 changes: 1 addition & 1 deletion axum/src/routing/method_routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ mod tests {
}

#[allow(dead_code)]
async fn buiding_complex_router() {
async fn building_complex_router() {
let app = crate::Router::new().route(
"/",
// use the all the things 💣️
Expand Down
2 changes: 1 addition & 1 deletion axum/src/routing/tests/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async fn nested_router_inherits_fallback() {
}

#[crate::test]
async fn doesnt_inherit_fallback_if_overriden() {
async fn doesnt_inherit_fallback_if_overridden() {
let inner = Router::new().fallback(inner_fallback);
let app = Router::new().nest("/foo", inner).fallback(outer_fallback);

Expand Down