Skip to content

Commit

Permalink
Merge pull request #168 from xsnippet/typos
Browse files Browse the repository at this point in the history
Spell check with Typos
  • Loading branch information
malor authored Nov 16, 2024
2 parents ef8baf4 + 3c959d5 commit afacae4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ defaults:
shell: bash

jobs:
spellcheck:
name: Spell check with Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/[email protected]

cargo-fmt:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion src/storage/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::error;
use std::fmt;

/// All errors that can be returned by the storage layer wrapped into a single
/// enum type for convinience.
/// enum type for convenience.
#[derive(Debug)]
pub enum StorageError {
/// Snippet with this id already exists in the database
Expand Down
6 changes: 3 additions & 3 deletions src/web/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::errors::ApiError;
use crate::storage::Pagination;

/// The default limit for the request size (to prevent DoS attacks). Can be
/// overriden in the config by setting `max_request_size` to a different value
/// overridden in the config by setting `max_request_size` to a different value
const MAX_REQUEST_SIZE: u64 = 1024 * 1024;
/// The list of supported formats. When changed, the implementation of
/// Input::from_data() must be updated accordingly.
Expand Down Expand Up @@ -109,7 +109,7 @@ impl<'r, 'o: 'r, T: Serialize> Responder<'r, 'o> for Output<T> {
Json(value).respond_to(request)
} else {
// this shouldn't be possible as by this point content negotiation has already
// succeded
// succeeded
error!("Failed to serialize data to {}", content_type);
Err(Status::InternalServerError)
}
Expand Down Expand Up @@ -173,7 +173,7 @@ impl FromFormField<'_> for PaginationLimit {
/// A guard that analyzes the Accept header of a user request to determine what
/// media type should be used for serializing the response.
///
/// 406 Not Accetable is returned if a user requests an unsupported data format.
/// 406 Not Acceptable is returned if a user requests an unsupported data format.
pub struct NegotiatedContentType(pub ContentType);

impl Default for NegotiatedContentType {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gabbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def start_fixture(self):
"ROCKET_JWT_JWKS_URI": "file://{}".format(self.jwks.name),
})

# this is ugly, but apparentely there is no other way to generate some
# this is ugly, but apparently there is no other way to generate some
# data in a Gabbi test fixture, and then use it in the YAML scenarios
self.tokens = self._generate_tokens(private_key)
os.environ.update(self.tokens)
Expand Down

0 comments on commit afacae4

Please sign in to comment.