Skip to content

Commit 7891acb

Browse files
committed
Remove Response enumeration
Fix imports
1 parent f7623e9 commit 7891acb

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

src/lib.rs

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
//! Now open up your `src/main.rs` file and establish a connection to the server while also adding some
4444
//! imports:
4545
//! ```no_run
46-
//! use skytable::{Connection, Query, Response, Element};
46+
//! use skytable::{Connection, Query, Element};
4747
//! fn main() -> std::io::Result<()> {
4848
//! let mut con = Connection::new("127.0.0.1", 2003)?;
4949
//! Ok(())
@@ -52,7 +52,7 @@
5252
//!
5353
//! Now let's run a [`Query`]! Change the previous code block to:
5454
//! ```no_run
55-
//! use skytable::{error, Connection, Query, Response, Element};
55+
//! use skytable::{error, Connection, Query, Element};
5656
//! fn main() -> Result<(), error::Error> {
5757
//! let mut con = Connection::new("127.0.0.1", 2003)?;
5858
//! let query = Query::from("heya");
@@ -473,25 +473,6 @@ impl Query {
473473
);
474474
}
475475

476-
/// # Responses
477-
///
478-
/// This enum represents responses returned by the server. This can either be an array (or bulk), a single item
479-
/// or can be a parse error if the server returned some data but it couldn't be parsed into the expected type
480-
/// or it can be an invalid response in the event the server sent some invalid data.
481-
/// This enum is `#[non_exhaustive]` as more types of responses can be added in the future.
482-
#[derive(Debug, PartialEq)]
483-
#[non_exhaustive]
484-
pub enum Response {
485-
/// The server sent an invalid response
486-
InvalidResponse,
487-
/// The server responded with _something_. This can be any of the [`Element`] variants
488-
Item(Element),
489-
/// We failed to parse data
490-
ParseError,
491-
/// The server sent some data of a type that this client doesn't support
492-
UnsupportedDataType,
493-
}
494-
495476
cfg_dbg!(
496477
#[test]
497478
fn my_query() {
@@ -505,9 +486,9 @@ cfg_dbg!(
505486

506487
pub mod error {
507488
//! Errors
489+
use crate::RespCode;
490+
use std::io::ErrorKind;
508491
cfg_ssl_any!(
509-
use crate::RespCode;
510-
use std::io::ErrorKind;
511492
use std::fmt;
512493
/// Errors that may occur while initiating an [async TLS connection](crate::aio::TlsConnection)
513494
/// or a [sync TLS connection](crate::sync::TlsConnection)

0 commit comments

Comments
 (0)