Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
53df1b90
Commit
53df1b90
authored
2 years ago
by
Georgy Moshkin
Browse files
Options
Downloads
Patches
Plain Diff
refactor(storage): add some sanity checks to this monstrosity
parent
f935278c
No related branches found
No related tags found
1 merge request
!442
feat(node): Node::storage_watcher for notifications on storage changes
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/storage.rs
+2
-0
2 additions, 0 deletions
src/storage.rs
src/util.rs
+14
-0
14 additions, 0 deletions
src/util.rs
with
16 additions
and
0 deletions
src/storage.rs
+
2
−
0
View file @
53df1b90
...
@@ -60,6 +60,8 @@ macro_rules! define_clusterwide_spaces {
...
@@ -60,6 +60,8 @@ macro_rules! define_clusterwide_spaces {
}
}
}
}
$
(
const
_
:
$crate
::
util
::
CheckIsSameType
<
$_cw_struct
,
$cw_struct
>
=
();
)
+
$
(
#[
$
cw_index_meta]
)
*
$
(
#[
$
cw_index_meta]
)
*
#[derive(Copy,
Clone,
Debug,
serde::Serialize,
serde::Deserialize,
PartialEq,
Eq,
Hash)]
#[derive(Copy,
Clone,
Debug,
serde::Serialize,
serde::Deserialize,
PartialEq,
Eq,
Hash)]
pub
enum
$cw_index
{
pub
enum
$cw_index
{
...
...
This diff is collapsed.
Click to expand it.
src/util.rs
+
14
−
0
View file @
53df1b90
...
@@ -420,6 +420,20 @@ where
...
@@ -420,6 +420,20 @@ where
}
}
}
}
////////////////////////////////////////////////////////////////////////////////
/// IsSameType
pub
trait
IsSameType
<
L
,
R
>
{
type
Void
;
}
impl
<
T
>
IsSameType
<
T
,
T
>
for
T
{
type
Void
=
();
}
#[allow(unused)]
pub
type
CheckIsSameType
<
L
,
R
>
=
<
L
as
IsSameType
<
L
,
R
>>
::
Void
;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// tests
/// tests
#[cfg(test)]
#[cfg(test)]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment