We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
QueryBuilder
1 parent abe2b2f commit d098847Copy full SHA for d098847
sqlx-core/src/query_builder.rs
@@ -518,8 +518,8 @@ where
518
/// The query is truncated to the initial fragment provided to [`new()`][Self::new] and
519
/// the bind arguments are reset.
520
pub fn reset(&mut self) -> &mut Self {
521
- // Someone can hold onto a clone of `self.query` by calling build and not executing the
522
- // query. To avoid panicking here we might as well allocate a new `String`.
+ // Someone can hold onto a clone of `self.query`, to avoid panicking here we should just
+ // allocate a new `String`.
523
let query: &mut String = Arc::make_mut(&mut self.query);
524
query.truncate(self.init_len);
525
self.arguments = Some(Default::default());
0 commit comments