Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcountryman committed Aug 29, 2024
1 parent b2495b2 commit 059a597
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ use tower::ServiceBuilder;
use tower_image_xform::{
image_type, ImageTransformerBuilder, Key, SignedUrlBuilder, SupportedImageTypes,
};
use url::Url;

// Define image types we want to support.
const SUPPORTED_IMAGE_TYPES: SupportedImageTypes = &[image_type::WEBP, image_type::PNG];
Expand All @@ -70,7 +69,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.build();

// URL construction.
let base_url: Url = "http://localhost:3000/_image/".parse()?;
let base_url = "http://localhost:3000/_image/".parse()?;
let target_url = "https://www.rustacean.net/assets/rustacean-orig-noshadow.png"
.parse()?;
let signed_url = SignedUrlBuilder::new()
Expand Down
3 changes: 1 addition & 2 deletions examples/basic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use tower_image_xform::{
image_type, ImageTransformerBuilder, Key, SignedUrlBuilder, SupportedImageTypes,
};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
use url::Url;

// Define image types we want to support.
const SUPPORTED_IMAGE_TYPES: SupportedImageTypes = &[image_type::WEBP, image_type::PNG];
Expand All @@ -27,7 +26,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.build();

// URL construction.
let base_url: Url = "http://localhost:3000/_image/".parse()?;
let base_url = "http://localhost:3000/_image/".parse()?;
let target_url = "https://www.rustacean.net/assets/rustacean-orig-noshadow.png".parse()?;
let signed_url = SignedUrlBuilder::new()
.key(signing_key)
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
//! use tower_image_xform::{
//! image_type, ImageTransformerBuilder, Key, SignedUrlBuilder, SupportedImageTypes,
//! };
//! use url::Url;
//!
//! // Define image types we want to support.
//! const SUPPORTED_IMAGE_TYPES: SupportedImageTypes = &[image_type::WEBP, image_type::PNG];
//!
//! #[tokio::main]
Expand All @@ -26,7 +26,7 @@
//! .build();
//!
//! // URL construction.
//! let base_url: Url = "http://localhost:3000/_image/".parse()?;
//! let base_url = "http://localhost:3000/_image/".parse()?;
//! let target_url = "https://www.rustacean.net/assets/rustacean-orig-noshadow.png".parse()?;
//! let signed_url = SignedUrlBuilder::new()
//! .key(signing_key)
Expand Down

0 comments on commit 059a597

Please sign in to comment.