Skip to content

Commit

Permalink
refactor: cleaned up some things
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-hen7 committed Jan 1, 2023
1 parent 7bddc4c commit 4df987e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions examples/website/state_generation/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async fn get_build_state(
Err(err) => {
return Err(BlamedError {
blame: ErrorBlame::Client(Some(404)),
error: MyError,
error: MyError(err),
})
}
};
Expand Down Expand Up @@ -84,8 +84,8 @@ async fn get_build_paths() -> BuildPaths {

// SNIP
#[derive(thiserror::Error, Debug)]
#[error("an error!")]
struct MyError;
#[error(transparent)]
struct MyError(io::Error);
fn get_post_for_path(_path: String) -> Result<Post, io::Error> {
unimplemented!()
}
Expand Down
2 changes: 0 additions & 2 deletions packages/perseus-actix-web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ documentation, and this should mostly be used as a secondary reference source. Y
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]

use std::sync::Arc;

use actix_files::{Files, NamedFile};
use actix_web::{web, HttpRequest, HttpResponse, Responder};
use perseus::turbine::ApiResponse as PerseusApiResponse;
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus/src/reactor/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
use sycamore::prelude::{create_effect, create_signal, on_mount, view, ReadSignal, Scope, View};
use sycamore_futures::spawn_local_scoped;
use sycamore_router::{navigate_replace, HistoryIntegration, RouterBase};
use web_sys::{CustomEvent, CustomEventInit, Element};
use web_sys::Element;

// We don't want to bring in a styling library, so we do this the old-fashioned
// way! We're particularly comprehensive with these because the user could
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus/src/state/rx_collections/rx_hash_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
}

#[cfg(client)]
fn compute_suspense(&self, cx: Scope) {}
fn compute_suspense(&self, _cx: Scope) {}
}
// --- Dereferencing ---
impl<K, V> Deref for RxHashMap<K, V>
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus/src/state/rx_collections/rx_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ where
}

#[cfg(client)]
fn compute_suspense(&self, cx: Scope) {}
fn compute_suspense(&self, _cx: Scope) {}
}
// --- Dereferencing ---
impl<T> Deref for RxVec<T>
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus/src/state/rx_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub trait MakeUnrx {
/// user's handlers. Each handler must have the following function
/// signature:
///
/// ```
/// ```text
/// Fn(Scope<'a>, RxRef<'a>);
/// ```
///
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus/src/translator/fluent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{reactor::Reactor, translator::errors::*, PerseusNodeType};
use fluent_bundle::{bundle::FluentBundle, FluentArgs, FluentResource};
use intl_memoizer::concurrent::IntlLangMemoizer;
use std::sync::Arc;
use sycamore::prelude::{use_context, Scope, Signal};
use sycamore::prelude::{use_context, Scope};
use unic_langid::{LanguageIdentifier, LanguageIdentifierError};

/// The file extension used by the Fluent translator, which expects FTL files.
Expand Down

0 comments on commit 4df987e

Please sign in to comment.