Skip to content

Commit

Permalink
refactor: update displays
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Apr 11, 2024
1 parent a5196a7 commit fa44f7d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions aws-lambda/src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use std::fmt::Display;

impl Display for tailcall::error::Error {

Check failure on line 3 in aws-lambda/src/error.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

only traits defined in the current crate can be implemented for types defined outside of the crate
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.pretty_print(f, true)
}
}
2 changes: 1 addition & 1 deletion aws-lambda/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use tailcall::blueprint::Blueprint;
use tailcall::config::reader::ConfigReader;
use tailcall::http::{handle_request, AppContext};
use tailcall::tracing::get_log_level;

mod error;
mod http;
mod runtime;

Expand Down
7 changes: 7 additions & 0 deletions cloudflare/src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use std::fmt::Display;

impl Display for crate::error::Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.pretty_print(f, true)
}
}
1 change: 1 addition & 0 deletions cloudflare/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use anyhow::anyhow;

mod cache;
mod env;
mod error;
mod file;
pub mod handle;
mod http;
Expand Down

0 comments on commit fa44f7d

Please sign in to comment.