diff --git a/Cargo.lock b/Cargo.lock index 7abb831..99a4705 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,12 +36,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "aho-corasick" version = "0.7.15" @@ -84,6 +78,27 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "async-stream" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3670df70cbc01729f901f94c887814b3c68db038aad1329a418bae178bc5295c" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3548b8efc9f8e8a5a0a2808c5bd8451a9031b9e5b879a79590304ae928b0a70" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "atty" version = "0.2.14" @@ -221,11 +236,11 @@ version = "0.1.0" dependencies = [ "eyre", "kankyo", - "reqwest", + "reqwest 0.11.0", "serde", "serde_json", "thiserror", - "tokio", + "tokio 1.1.0", "tracing", "tracing-futures", ] @@ -374,7 +389,7 @@ dependencies = [ "pest_consume", "pest_generator", "quote", - "reqwest", + "reqwest 0.10.10", "serde", "serde_cbor", "sha2", @@ -492,6 +507,18 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +[[package]] +name = "flate2" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129" +dependencies = [ + "cfg-if 1.0.0", + "crc32fast", + "libc", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -682,8 +709,28 @@ dependencies = [ "http", "indexmap", "slab", - "tokio", - "tokio-util", + "tokio 0.2.24", + "tokio-util 0.3.1", + "tracing", + "tracing-futures", +] + +[[package]] +name = "h2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" +dependencies = [ + "bytes 1.0.0", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio 1.1.0", + "tokio-util 0.6.2", "tracing", "tracing-futures", ] @@ -761,6 +808,16 @@ dependencies = [ "http", ] +[[package]] +name = "http-body" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" +dependencies = [ + "bytes 1.0.0", + "http", +] + [[package]] name = "httparse" version = "1.3.4" @@ -792,15 +849,39 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.2.7", "http", - "http-body", + "http-body 0.3.1", "httparse", "httpdate", "itoa", "pin-project 1.0.4", "socket2", - "tokio", + "tokio 0.2.24", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe" +dependencies = [ + "bytes 1.0.0", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.0", + "http", + "http-body 0.4.0", + "httparse", + "httpdate", + "itoa", + "pin-project 1.0.4", + "socket2", + "tokio 1.1.0", "tower-service", "tracing", "want", @@ -813,12 +894,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" dependencies = [ "bytes 0.5.6", - "hyper", + "hyper 0.13.9", "native-tls", - "tokio", + "tokio 0.2.24", "tokio-tls", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes 1.0.0", + "hyper 0.14.2", + "native-tls", + "tokio 1.1.0", + "tokio-native-tls", +] + [[package]] name = "idna" version = "0.2.0" @@ -848,11 +942,11 @@ dependencies = [ [[package]] name = "input_buffer" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" +checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.0", ] [[package]] @@ -954,24 +1048,6 @@ version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" -[[package]] -name = "libflate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389de7875e06476365974da3e7ff85d55f1972188ccd9f6020dd7c8156e17914" -dependencies = [ - "adler32", - "crc32fast", - "libflate_lz77", - "rle-decode-fast", -] - -[[package]] -name = "libflate_lz77" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3286f09f7d4926fc486334f28d8d2e6ebe4f7f9994494b6dab27ddfad2c9b11b" - [[package]] name = "linked-hash-map" version = "0.5.4" @@ -1037,11 +1113,11 @@ dependencies = [ "color-eyre", "envy", "pretty_env_logger", - "reqwest", + "reqwest 0.11.0", "serde", "serde_json", "thiserror", - "tokio", + "tokio 1.1.0", "tracing", "tracing-futures", ] @@ -1092,26 +1168,16 @@ dependencies = [ ] [[package]] -name = "mio-named-pipes" -version = "0.1.7" +name = "mio" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" +checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" dependencies = [ - "log", - "mio", - "miow 0.3.6", - "winapi 0.3.9", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", "libc", - "mio", + "log", + "miow 0.3.6", + "ntapi", + "winapi 0.3.9", ] [[package]] @@ -1194,6 +1260,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -1318,11 +1393,11 @@ dependencies = [ "chrono", "envy", "pretty_env_logger", - "reqwest", + "reqwest 0.11.0", "serde", "serde_json", "thiserror", - "tokio", + "tokio 1.1.0", "tracing", "tracing-futures", ] @@ -1406,7 +1481,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83abebdb324c30f176d449513f0134bafbf976d5279c6554742599e3996d1629" dependencies = [ - "rand 0.7.3", + "rand 0.8.2", "serde", "serde_derive", "serde_json", @@ -1518,25 +1593,25 @@ dependencies = [ [[package]] name = "procfs" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a336c8310f4955f343935b9c11a30254d1ad8fad98ec257a4407a061a6fd49" +checksum = "ab8809e0c18450a2db0f236d2a44ec0b4c1412d0eb936233579f0990faa5d5cd" dependencies = [ "bitflags", "byteorder", + "flate2", "hex", "lazy_static", "libc", - "libflate", ] [[package]] name = "prometheus" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d70cf4412832bcac9cffe27906f4a66e450d323525e977168c70d1b36120ae" +checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "fnv", "lazy_static", "libc", @@ -1697,9 +1772,9 @@ dependencies = [ "futures-core", "futures-util", "http", - "http-body", - "hyper", - "hyper-tls", + "http-body 0.3.1", + "hyper 0.13.9", + "hyper-tls 0.4.3", "ipnet", "js-sys", "lazy_static", @@ -1711,8 +1786,8 @@ dependencies = [ "pin-project-lite 0.2.3", "serde", "serde_json", - "serde_urlencoded 0.7.0", - "tokio", + "serde_urlencoded", + "tokio 0.2.24", "tokio-tls", "url", "wasm-bindgen", @@ -1722,10 +1797,39 @@ dependencies = [ ] [[package]] -name = "rle-decode-fast" -version = "1.0.1" +name = "reqwest" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" +checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" +dependencies = [ + "base64 0.13.0", + "bytes 1.0.0", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body 0.4.0", + "hyper 0.14.2", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite 0.2.3", + "serde", + "serde_json", + "serde_urlencoded", + "tokio 1.1.0", + "tokio-native-tls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] [[package]] name = "ructe" @@ -1812,9 +1916,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.118" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +checksum = "166b2349061381baf54a58e4b13c89369feb0ef2eaa57198899e2312aac30aab" dependencies = [ "serde_derive", ] @@ -1831,9 +1935,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.118" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +checksum = "0ca2a8cb5805ce9e3b95435e3765b7b553cecc762d938d409434338386cb5775" dependencies = [ "proc-macro2", "quote", @@ -1864,18 +1968,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_urlencoded" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -dependencies = [ - "dtoa", - "itoa", - "serde", - "url", -] - [[package]] name = "serde_urlencoded" version = "0.7.0" @@ -2118,30 +2210,65 @@ dependencies = [ "futures-core", "iovec", "lazy_static", - "libc", "memchr", - "mio", - "mio-named-pipes", - "mio-uds", + "mio 0.6.23", "num_cpus", "pin-project-lite 0.1.11", - "signal-hook-registry", "slab", +] + +[[package]] +name = "tokio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8efab2086f17abcddb8f756117665c958feee6b2e39974c2f1600592ab3a4195" +dependencies = [ + "autocfg", + "bytes 1.0.0", + "libc", + "memchr", + "mio 0.7.7", + "num_cpus", + "once_cell", + "parking_lot", + "pin-project-lite 0.2.3", + "signal-hook-registry", "tokio-macros", "winapi 0.3.9", ] [[package]] name = "tokio-macros" -version = "0.2.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" +checksum = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio 1.1.0", +] + +[[package]] +name = "tokio-stream" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76066865172052eb8796c686f0b441a93df8b08d40a950b062ffb9a426f00edd" +dependencies = [ + "futures-core", + "pin-project-lite 0.2.3", + "tokio 1.1.0", +] + [[package]] name = "tokio-tls" version = "0.3.1" @@ -2149,19 +2276,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" dependencies = [ "native-tls", - "tokio", + "tokio 0.2.24", ] [[package]] name = "tokio-tungstenite" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9e878ad426ca286e4dcae09cbd4e1973a7f8987d97570e2469703dd7f5720c" +checksum = "e1a5f475f1b9d077ea1017ecbc60890fda8e54942d680ca0b1d2b47cfa2d861b" dependencies = [ "futures-util", "log", - "pin-project 0.4.27", - "tokio", + "pin-project 1.0.4", + "tokio 1.1.0", "tungstenite", ] @@ -2176,7 +2303,23 @@ dependencies = [ "futures-sink", "log", "pin-project-lite 0.1.11", - "tokio", + "tokio 0.2.24", +] + +[[package]] +name = "tokio-util" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feb971a26599ffd28066d387f109746df178eff14d5ea1e235015c5601967a4b" +dependencies = [ + "async-stream", + "bytes 1.0.0", + "futures-core", + "futures-sink", + "log", + "pin-project-lite 0.2.3", + "tokio 1.1.0", + "tokio-stream", ] [[package]] @@ -2289,18 +2432,18 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tungstenite" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" +checksum = "8ada8297e8d70872fa9a551d93250a9f407beb9f37ef86494eb20012a2ff7c24" dependencies = [ - "base64 0.12.3", + "base64 0.13.0", "byteorder", - "bytes 0.5.6", + "bytes 1.0.0", "http", "httparse", "input_buffer", "log", - "rand 0.7.3", + "rand 0.8.2", "sha-1 0.9.2", "url", "utf-8", @@ -2406,12 +2549,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "urlencoding" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9232eb53352b4442e40d7900465dfc534e8cb2dc8f18656fcb2ac16112b5593" - [[package]] name = "utf-8" version = "0.7.5" @@ -2458,30 +2595,32 @@ dependencies = [ [[package]] name = "warp" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41be6df54c97904af01aa23e613d4521eed7ab23537cede692d4058f6449407" +checksum = "3dafd0aac2818a94a34df0df1100a7356c493d8ede4393875fd0b5c51bb6bc80" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.0", "futures", "headers", "http", - "hyper", + "hyper 0.14.2", "log", "mime", "mime_guess", "multipart", - "pin-project 0.4.27", + "percent-encoding", + "pin-project 1.0.4", "scoped-tls", "serde", "serde_json", - "serde_urlencoded 0.6.1", - "tokio", + "serde_urlencoded", + "tokio 1.1.0", + "tokio-stream", "tokio-tungstenite", + "tokio-util 0.6.2", "tower-service", "tracing", "tracing-futures", - "urlencoding", ] [[package]] @@ -2654,7 +2793,7 @@ dependencies = [ "eyre", "glob", "go_vanity", - "hyper", + "hyper 0.14.2", "jsonfeed", "kankyo", "lazy_static", @@ -2666,7 +2805,8 @@ dependencies = [ "pretty_env_logger", "prometheus", "rand 0.8.2", - "reqwest", + "reqwest 0.10.10", + "reqwest 0.11.0", "ructe", "sdnotify", "serde", @@ -2675,7 +2815,7 @@ dependencies = [ "serde_yaml", "sitemap", "thiserror", - "tokio", + "tokio 1.1.0", "tracing", "tracing-futures", "tracing-subscriber", diff --git a/Cargo.toml b/Cargo.toml index 95e1372..0219e37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,25 +14,25 @@ chrono = "0.4" comrak = "0.9" envy = "0.4" glob = "0.3" -hyper = "0.13" +hyper = "0.14" kankyo = "0.3" lazy_static = "1.4" log = "0.4" mime = "0.3.0" -prometheus = { version = "0.10", default-features = false, features = ["process"] } +prometheus = { version = "0.11", default-features = false, features = ["process"] } rand = "0" -reqwest = { version = "0.10", features = ["json"] } +reqwest = { version = "0.11", features = ["json"] } sdnotify = { version = "0.1", default-features = false } serde_dhall = "0.9.0" serde = { version = "1", features = ["derive"] } serde_yaml = "0.8" sitemap = "0.4" thiserror = "1" -tokio = { version = "0.2", features = ["macros"] } +tokio = { version = "1", features = ["full"] } tracing = "0.1" tracing-futures = "0.2" tracing-subscriber = { version = "0.2", features = ["fmt"] } -warp = "0.2" +warp = "0.3" xml-rs = "0.8" url = "2" uuid = { version = "0.8", features = ["serde", "v4"] } @@ -51,7 +51,6 @@ ructe = { version = "0.13", features = ["warp02"] } pfacts = "0" serde_json = "1" eyre = "0.6" -reqwest = { version = "0.10", features = ["json"] } pretty_env_logger = "0" [workspace] diff --git a/lib/cfcache/Cargo.toml b/lib/cfcache/Cargo.toml index 85060c2..8ca353d 100644 --- a/lib/cfcache/Cargo.toml +++ b/lib/cfcache/Cargo.toml @@ -7,8 +7,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -reqwest = { version = "0.10", features = ["json"] } -serde_json = "1.0" +reqwest = { version = "0.11", features = ["json"] } +serde_json = "1" serde = { version = "1", features = ["derive"] } thiserror = "1" tracing = "0.1" @@ -17,4 +17,4 @@ tracing-futures = "0.2" [dev-dependencies] eyre = "0.6.5" kankyo = "0.3" -tokio = { version = "0.2", features = ["full"] } +tokio = { version = "1", features = ["full"] } diff --git a/lib/go_vanity/Cargo.toml b/lib/go_vanity/Cargo.toml index d753a8a..6aaf748 100644 --- a/lib/go_vanity/Cargo.toml +++ b/lib/go_vanity/Cargo.toml @@ -8,8 +8,8 @@ build = "src/build.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -mime = "0.3.0" -warp = "0.2" +mime = "0.3" +warp = "0.3" [build-dependencies] ructe = { version = "0.13", features = ["warp02"] } diff --git a/lib/mi/Cargo.toml b/lib/mi/Cargo.toml index 1d0e716..ef4f1a2 100644 --- a/lib/mi/Cargo.toml +++ b/lib/mi/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] chrono = { version = "0.4", features = ["serde"] } color-eyre = "0.5" -reqwest = { version = "0.10", features = ["json"] } +reqwest = { version = "0.11", features = ["json"] } serde_json = "1.0" serde = { version = "1", features = ["derive"] } thiserror = "1" @@ -17,6 +17,6 @@ tracing = "0.1" tracing-futures = "0.2" [dev-dependencies] -tokio = { version = "0.2", features = ["macros"] } +tokio = { version = "1", features = ["macros"] } envy = "0.4" pretty_env_logger = "0" diff --git a/lib/patreon/Cargo.toml b/lib/patreon/Cargo.toml index fc204a4..6c3e001 100644 --- a/lib/patreon/Cargo.toml +++ b/lib/patreon/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] chrono = { version = "0.4", features = ["serde"] } -reqwest = { version = "0.10", features = ["json"] } +reqwest = { version = "0.11", features = ["json"] } serde_json = "1.0" serde = { version = "1", features = ["derive"] } thiserror = "1" @@ -16,6 +16,6 @@ tracing = "0.1" tracing-futures = "0.2" [dev-dependencies] -tokio = { version = "0.2", features = ["macros"] } +tokio = { version = "1", features = ["macros"] } envy = "0.4" pretty_env_logger = "0" \ No newline at end of file diff --git a/src/app/poke.rs b/src/app/poke.rs index dd6f9fe..eddb85e 100644 --- a/src/app/poke.rs +++ b/src/app/poke.rs @@ -1,6 +1,6 @@ use color_eyre::eyre::Result; use std::{env, time::Duration}; -use tokio::time::delay_for; +use tokio::time::sleep as delay_for; #[instrument(err)] pub async fn the_cloud() -> Result<()> { diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index d180a11..c6dbd65 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -5,11 +5,11 @@ use crate::{ use lazy_static::lazy_static; use prometheus::{opts, register_int_counter_vec, IntCounterVec}; use std::{convert::Infallible, fmt, sync::Arc}; +use tracing::instrument; use warp::{ http::{Response, StatusCode}, Rejection, Reply, }; -use tracing::instrument; lazy_static! { static ref HIT_COUNTER: IntCounterVec = @@ -86,12 +86,6 @@ impl fmt::Display for PostNotFound { impl warp::reject::Reject for PostNotFound {} -impl From for warp::reject::Rejection { - fn from(error: PostNotFound) -> Self { - warp::reject::custom(error) - } -} - #[derive(Debug, thiserror::Error)] struct SeriesNotFound(String); @@ -103,12 +97,6 @@ impl fmt::Display for SeriesNotFound { impl warp::reject::Reject for SeriesNotFound {} -impl From for warp::reject::Rejection { - fn from(error: SeriesNotFound) -> Self { - warp::reject::custom(error) - } -} - lazy_static! { static ref REJECTION_COUNTER: IntCounterVec = register_int_counter_vec!( opts!("rejections", "Number of rejections by kind"), diff --git a/templates/blog_atom.rs.xml b/templates/blog_atom.rs.xml index c6fd32c..0296da6 100644 --- a/templates/blog_atom.rs.xml +++ b/templates/blog_atom.rs.xml @@ -19,7 +19,7 @@ https://christine.website/@post.link @post.front_matter.title - @post.date.to_rfc3339() + @post.date.to_rfc3339() } diff --git a/templates/footer.rs.html b/templates/footer.rs.html index 6ae18e6..c60f60a 100644 --- a/templates/footer.rs.html +++ b/templates/footer.rs.html @@ -1,5 +1,3 @@ -@use crate::APPLICATION_NAME as APP; - @()