Skip to content

Commit 35d8317

Browse files
authored
Merge pull request #7 from agrover/style-stuff
Some style-related cleanups
2 parents c46a287 + f0df4e4 commit 35d8317

File tree

3 files changed

+97
-107
lines changed

3 files changed

+97
-107
lines changed

src/admin_sockets.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ use std::io::{Read, Write, Cursor};
1919
use std::os::unix::net::UnixStream;
2020
use std::net::Shutdown;
2121

22-
use error::RadosError;
22+
use error::{RadosError, RadosResult};
2323
use byteorder::{BigEndian, ReadBytesExt};
2424

2525
/// This is a helper function that builds a raw command from the actual command. You just pass
2626
/// in a command like "help". The returned `String` will be a JSON String.
27-
pub fn admin_socket_command(cmd: &str, socket: &str) -> Result<String, RadosError> {
27+
pub fn admin_socket_command(cmd: &str, socket: &str) -> RadosResult<String> {
2828
let raw_cmd = format!("{{\"{}\": \"{}\"}}", "prefix", cmd);
2929
admin_socket_raw_command(&raw_cmd, socket)
3030
}
3131

3232
/// This function supports a raw command in the format of something like: `{"prefix": "help"}`.
3333
/// The returned `String` will be a JSON String.
3434
#[allow(unused_variables)]
35-
pub fn admin_socket_raw_command(cmd: &str, socket: &str) -> Result<String, RadosError> {
35+
pub fn admin_socket_raw_command(cmd: &str, socket: &str) -> RadosResult<String> {
3636
let mut output = String::new();
3737
let mut buffer = vec![0;4]; // Should return 4 bytes with size or indicator.
3838
let cmd = &format!("{}\0", cmd); // Terminator so don't add one to commands.

0 commit comments

Comments
 (0)