Compare commits

...
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ jobs:
name: Renovate
runs-on: ubuntu-latest
container:
image: ghcr.io/renovatebot/renovate:43.260.2@sha256:60d830108d9ff6408d11a55d5f110ee0976bed78a6b82b08211e3ddb72f72952
image: ghcr.io/renovatebot/renovate:43.272.0@sha256:146687c511f2593595cfce8be027e137b160a59670b8f4a09244d195a473a32e
options: --tmpfs /tmp:exec
steps:
- name: Checkout
+2 -2
View File
@@ -25,11 +25,11 @@ pub struct DeviceToken {
}
impl DeviceToken {
const DEVICE_ID_LENGTH: usize = 10;
const ACCESS_TOKEN_LENGTH: usize = 24;
pub fn new(token: String) -> Self { Self { token, max_age: None } }
pub fn new_random() -> Self { Self::new(utils::random_string(Self::DEVICE_ID_LENGTH)) }
pub fn new_random() -> Self { Self::new(utils::random_string(Self::ACCESS_TOKEN_LENGTH)) }
pub fn with_max_age(self, max_age: Duration) -> Self {
assign!(self, { max_age: Some(max_age) })