|
17 | 17 | * under the License. |
18 | 18 | */ |
19 | 19 |
|
20 | | -use std::{ |
21 | | - ffi::c_char, |
22 | | - ptr::{addr_of_mut, null_mut}, |
23 | | -}; |
| 20 | +use std::{ffi::c_char, ptr::addr_of_mut}; |
24 | 21 |
|
25 | 22 | use typedb_driver::{ |
26 | 23 | analyze::{ |
27 | 24 | conjunction::{ |
28 | | - Comparator, Conjunction, ConjunctionID, Constraint, ConstraintExactness, ConstraintSpan, ConstraintVertex, |
29 | | - ConstraintWithSpan, NamedRole, Variable, |
| 25 | + Comparator, Conjunction, ConjunctionID, Constraint, ConstraintExactness, ConstraintVertex, |
| 26 | + ConstraintWithSpan, Variable, NamedRole |
30 | 27 | }, |
31 | 28 | pipeline::{Pipeline, PipelineStage, ReduceAssignment, Reducer, SortOrder, SortVariable}, |
32 | 29 | AnalyzedQuery, Fetch, Function, ReturnOperation, TypeAnnotations, VariableAnnotations, |
33 | 30 | }, |
34 | 31 | box_stream, |
35 | | - concept::{type_::Type, AttributeType, Concept, Kind, ValueType}, |
| 32 | + concept::{type_::Type, Concept, Kind}, |
36 | 33 | BoxPromise, Promise, |
37 | 34 | }; |
38 | 35 |
|
39 | 36 | use crate::{ |
40 | | - common::StringIterator, |
41 | | - concept::ConceptIterator, |
42 | | - error::try_release, |
43 | | - iterator::{iterator_next, CIterator}, |
44 | | - memory::{ |
45 | | - borrow, free, release, release_optional, release_optional_string, release_string, string_view, take_ownership, |
| 37 | + common::{ |
| 38 | + error::try_release, |
| 39 | + iterator::{iterator_next, CIterator}, |
| 40 | + memory::{ |
| 41 | + borrow, free, release, release_optional, release_optional_string, release_string, string_view, |
| 42 | + take_ownership, |
| 43 | + }, |
| 44 | + StringIterator, |
46 | 45 | }, |
| 46 | + concept::ConceptIterator, |
47 | 47 | }; |
48 | 48 |
|
49 | 49 | // Iterators, promises & enums |
@@ -406,15 +406,15 @@ pub extern "C" fn pipeline_stage_require_get_variables(stage: *const PipelineSta |
406 | 406 | #[no_mangle] |
407 | 407 | pub extern "C" fn pipeline_stage_offset_get_offset(stage: *const PipelineStage) -> i64 { |
408 | 408 | let PipelineStage::Offset { offset, .. } = borrow(stage) else { unreachable!("Expected Offset stage") }; |
409 | | - (*offset as i64) |
| 409 | + *offset as i64 |
410 | 410 | } |
411 | 411 |
|
412 | 412 | /// Unwraps the <code>PipelineStage</code> instance as a Limit stage, and returns the limit applied. |
413 | 413 | /// Will panic if the stage is not a Limit stage. |
414 | 414 | #[no_mangle] |
415 | 415 | pub extern "C" fn pipeline_stage_limit_get_limit(stage: *const PipelineStage) -> i64 { |
416 | 416 | let PipelineStage::Limit { limit, .. } = borrow(stage) else { unreachable!("Expected Limit stage") }; |
417 | | - (*limit as i64) |
| 417 | + *limit as i64 |
418 | 418 | } |
419 | 419 |
|
420 | 420 | /// Unwraps the <code>PipelineStage</code> instance as a Sort stage, and returns the <code>SortVariable</code>. |
|
0 commit comments