refactor: fix lifetime annotations in draft.rs
ci: add cargo retry settings
This commit is contained in:
3
.github/workflows/autobuild.yml
vendored
3
.github/workflows/autobuild.yml
vendored
@@ -193,6 +193,9 @@ jobs:
|
||||
- os: ubuntu-22.04
|
||||
target: x86_64-unknown-linux-gnu
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CARGO_NET_RETRY: "5"
|
||||
CARGO_HTTP_CHECK_REVOKE: "false"
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
3
.github/workflows/clippy.yml
vendored
3
.github/workflows/clippy.yml
vendored
@@ -17,6 +17,9 @@ jobs:
|
||||
target: x86_64-unknown-linux-gnu
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CARGO_NET_RETRY: "5"
|
||||
CARGO_HTTP_CHECK_REVOKE: "false"
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
3
.github/workflows/dev.yml
vendored
3
.github/workflows/dev.yml
vendored
@@ -28,6 +28,9 @@ jobs:
|
||||
bundle: dmg
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CARGO_NET_RETRY: "5"
|
||||
CARGO_HTTP_CHECK_REVOKE: "false"
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
3
.github/workflows/fmt.yml
vendored
3
.github/workflows/fmt.yml
vendored
@@ -10,6 +10,9 @@ on:
|
||||
jobs:
|
||||
rustfmt:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CARGO_NET_RETRY: "5"
|
||||
CARGO_HTTP_CHECK_REVOKE: "false"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ scripts/_env.sh
|
||||
.tool-versions
|
||||
.idea
|
||||
.old
|
||||
bun.lock
|
||||
@@ -19,11 +19,11 @@ macro_rules! draft_define {
|
||||
|
||||
impl Draft<Box<$id>> {
|
||||
#[allow(unused)]
|
||||
pub fn data(&self) -> MappedMutexGuard<Box<$id>> {
|
||||
pub fn data(&self) -> MappedMutexGuard<'_, Box<$id>> {
|
||||
MutexGuard::map(self.inner.lock(), |guard| &mut guard.0)
|
||||
}
|
||||
|
||||
pub fn latest(&self) -> MappedMutexGuard<Box<$id>> {
|
||||
pub fn latest(&self) -> MappedMutexGuard<'_, Box<$id>> {
|
||||
MutexGuard::map(self.inner.lock(), |inner| {
|
||||
if inner.1.is_none() {
|
||||
&mut inner.0
|
||||
@@ -33,7 +33,7 @@ macro_rules! draft_define {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn draft(&self) -> MappedMutexGuard<Box<$id>> {
|
||||
pub fn draft(&self) -> MappedMutexGuard<'_, Box<$id>> {
|
||||
MutexGuard::map(self.inner.lock(), |inner| {
|
||||
if inner.1.is_none() {
|
||||
inner.1 = Some(inner.0.clone());
|
||||
|
||||
Reference in New Issue
Block a user