Skip to content

Commit

Permalink
Show the number of bytes send/received
Browse files Browse the repository at this point in the history
+ clippy and cleanup
  • Loading branch information
heeckhau committed Mar 4, 2024
1 parent 34b1355 commit f4c0ed8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/components/content_iframe.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use gloo::console::log;
use std::fmt;
// use gloo::console::log;
// use std::fmt;

use spansy::http::parse_response;
use wasm_bindgen::prelude::*;
Expand All @@ -26,11 +26,11 @@ enum ContentType {
Other,
}
fn get_content_type(bytes: &[u8]) -> (ContentType, String) {
match parse_response(&bytes) {
match parse_response(bytes) {
Ok(x) => {
// log!(format!("Test {:?}", x.headers));

let content_type = (&x)
let content_type = x
.headers
.iter()
.find(|h| h.name.as_str().to_lowercase() == "content-type")
Expand Down Expand Up @@ -58,7 +58,7 @@ fn get_content_type(bytes: &[u8]) -> (ContentType, String) {
#[function_component]
pub fn ContentIFrame(props: &Props) -> Html {
// JavaScript function to trigger Prism highlighting
use_effect(move || highlight_code());
use_effect(highlight_code);

match get_content_type(&props.bytes) {
(ContentType::Html, content_html) => html! {
Expand Down
2 changes: 1 addition & 1 deletion src/components/pem_input.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use elliptic_curve::{pkcs8::DecodePublicKey, PublicKey};
use elliptic_curve::pkcs8::DecodePublicKey;

#[allow(unused_imports)]
use gloo::console::log;
Expand Down

0 comments on commit f4c0ed8

Please sign in to comment.