Skip to content

Commit

Permalink
remove cfg-if
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Nov 18, 2023
1 parent 83e61e8 commit edd52c4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ edition.workspace = true
bevy = "0.12.0"
bevy_rapier3d = { version = "0.23.0", features = ["simd-stable"] }
bevy_vrm = "0.0.5"
cfg-if = "1.0.0"
tracing = "0.1.40"
2 changes: 0 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@
alsa-lib
udev
vulkan-loader

libxkbcommon
wayland

xorg.libX11
xorg.libXcursor
xorg.libXi
Expand Down
1 change: 0 additions & 1 deletion web/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ repository.workspace = true
edition.workspace = true

[dependencies]
cfg-if = "1.0.0"
http = "0.2.9"
leptos = "0.5.1"
leptos_axum = { version = "0.5.1", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions web/app/src/error_template.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use cfg_if::cfg_if;
use http::status::StatusCode;
use leptos::*;
use thiserror::Error;
Expand Down Expand Up @@ -46,12 +45,13 @@ pub fn ErrorTemplate(

// Only the response code for the first error is actually sent from the server
// this may be customized by the specific application
cfg_if! { if #[cfg(feature="ssr")] {
#[cfg(feature = "ssr")]
{
let response = use_context::<ResponseOptions>();
if let Some(response) = response {
response.set_status(errors[0].status_code());
}
}}
}

view! {
<h1>{if errors.len() > 1 {"Errors"} else {"Error"}}</h1>
Expand Down

0 comments on commit edd52c4

Please sign in to comment.