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
|
- os: ubuntu-22.04
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CARGO_NET_RETRY: "5"
|
||||||
|
CARGO_HTTP_CHECK_REVOKE: "false"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
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
|
target: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CARGO_NET_RETRY: "5"
|
||||||
|
CARGO_HTTP_CHECK_REVOKE: "false"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
3
.github/workflows/dev.yml
vendored
3
.github/workflows/dev.yml
vendored
@@ -28,6 +28,9 @@ jobs:
|
|||||||
bundle: dmg
|
bundle: dmg
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CARGO_NET_RETRY: "5"
|
||||||
|
CARGO_HTTP_CHECK_REVOKE: "false"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
3
.github/workflows/fmt.yml
vendored
3
.github/workflows/fmt.yml
vendored
@@ -10,6 +10,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
rustfmt:
|
rustfmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CARGO_NET_RETRY: "5"
|
||||||
|
CARGO_HTTP_CHECK_REVOKE: "false"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ scripts/_env.sh
|
|||||||
.tool-versions
|
.tool-versions
|
||||||
.idea
|
.idea
|
||||||
.old
|
.old
|
||||||
|
bun.lock
|
||||||
@@ -19,11 +19,11 @@ macro_rules! draft_define {
|
|||||||
|
|
||||||
impl Draft<Box<$id>> {
|
impl Draft<Box<$id>> {
|
||||||
#[allow(unused)]
|
#[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)
|
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| {
|
MutexGuard::map(self.inner.lock(), |inner| {
|
||||||
if inner.1.is_none() {
|
if inner.1.is_none() {
|
||||||
&mut inner.0
|
&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| {
|
MutexGuard::map(self.inner.lock(), |inner| {
|
||||||
if inner.1.is_none() {
|
if inner.1.is_none() {
|
||||||
inner.1 = Some(inner.0.clone());
|
inner.1 = Some(inner.0.clone());
|
||||||
|
|||||||
Reference in New Issue
Block a user