mirror of
https://github.com/trailbaseio/trailbase.git
synced 2026-05-01 05:59:35 -05:00
Minor: please clippy the friendly paperclip.
This commit is contained in:
@@ -90,7 +90,7 @@ trailbase-refinery = { workspace = true }
|
||||
trailbase-schema = { workspace = true }
|
||||
trailbase-sqlite = { workspace = true }
|
||||
ts-rs = { version = "10", features = ["uuid-impl", "serde-json-impl"] }
|
||||
url = "^2.4.1"
|
||||
url = { version = "^2.4.1", default-features = false }
|
||||
utoipa = { version = "5.0.0-beta.0", features = ["axum_extras"] }
|
||||
uuid = { workspace = true }
|
||||
validator = { version = "0.20.0", default-features = false }
|
||||
|
||||
@@ -94,7 +94,7 @@ pub async fn list_rows_handler(
|
||||
|
||||
let cursor_column = table_or_view_metadata.record_pk_column();
|
||||
let cursor = match (cursor, cursor_column) {
|
||||
(Some(cursor), Some((_idx, c))) => Some(parse_cursor(&cursor, &c)?),
|
||||
(Some(cursor), Some((_idx, c))) => Some(parse_cursor(&cursor, c)?),
|
||||
_ => None,
|
||||
};
|
||||
let (rows, columns) = fetch_rows(
|
||||
|
||||
@@ -119,7 +119,7 @@ impl Email {
|
||||
.render(context! {
|
||||
APP_NAME => server_config.application_name,
|
||||
VERIFICATION_URL => verification_url,
|
||||
SITE_URL => site_url,
|
||||
SITE_URL => *site_url,
|
||||
CODE => email_verification_code,
|
||||
EMAIL => email,
|
||||
})?;
|
||||
@@ -165,7 +165,7 @@ impl Email {
|
||||
.render(context! {
|
||||
APP_NAME => server_config.application_name,
|
||||
VERIFICATION_URL => verification_url,
|
||||
SITE_URL => site_url,
|
||||
SITE_URL => *site_url,
|
||||
CODE => email_verification_code,
|
||||
EMAIL => email,
|
||||
})?;
|
||||
@@ -211,7 +211,7 @@ impl Email {
|
||||
.render(context! {
|
||||
APP_NAME => server_config.application_name,
|
||||
VERIFICATION_URL => verification_url,
|
||||
SITE_URL => site_url,
|
||||
SITE_URL => *site_url,
|
||||
CODE => password_reset_code,
|
||||
EMAIL => email,
|
||||
})?;
|
||||
|
||||
@@ -29,15 +29,15 @@ impl Cursor {
|
||||
pub fn parse(s: &str, cursor_type: CursorType) -> Result<Self, Error> {
|
||||
return match cursor_type {
|
||||
CursorType::Integer => {
|
||||
let i = s.parse::<i64>().map_err(|err| Error::ParseInt(err))?;
|
||||
let i = s.parse::<i64>().map_err(Error::ParseInt)?;
|
||||
Ok(Self::Integer(i))
|
||||
}
|
||||
CursorType::Blob => {
|
||||
if let Ok(uuid) = uuid::Uuid::parse_str(&s) {
|
||||
if let Ok(uuid) = uuid::Uuid::parse_str(s) {
|
||||
return Ok(Cursor::Blob(uuid.into()));
|
||||
}
|
||||
|
||||
if let Ok(base64) = BASE64_URL_SAFE.decode(&s) {
|
||||
if let Ok(base64) = BASE64_URL_SAFE.decode(s) {
|
||||
return Ok(Cursor::Blob(base64));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user