Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix all broken links #4694

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

### Changed
* refactor: Merge compose_{read,write} into enum_utils by @Xuanwo in https://github.com/apache/opendal/pull/3871
* refactor(services/ftp): Impl parse_error instead of From<Error> by @bokket in https://github.com/apache/opendal/pull/3891
* refactor(services/ftp): Impl parse_error instead of `From<Error>` by @bokket in https://github.com/apache/opendal/pull/3891
* docs: very minor English wording fix in error message by @gabrielgrant in https://github.com/apache/opendal/pull/3900
* refactor(services/rocksdb): Impl parse_error instead of From<Error> by @suyanhanx in https://github.com/apache/opendal/pull/3903
* refactor(services/rocksdb): Impl parse_error instead of `From<Error>` by @suyanhanx in https://github.com/apache/opendal/pull/3903
* refactor: Re-organize the layout of tests by @Xuanwo in https://github.com/apache/opendal/pull/3904
* refactor(services/etcd): Impl parse_error instead of From<Error> by @suyanhanx in https://github.com/apache/opendal/pull/3910
* refactor(services/sftp): Impl parse_error instead of From<Error> by @G-XD in https://github.com/apache/opendal/pull/3914
* refactor(services/etcd): Impl parse_error instead of `From<Error>` by @suyanhanx in https://github.com/apache/opendal/pull/3910
* refactor(services/sftp): Impl parse_error instead of `From<Error>` by @G-XD in https://github.com/apache/opendal/pull/3914
* refactor!: Bump MSRV to 1.75 by @Xuanwo in https://github.com/apache/opendal/pull/3851
* refactor(services/redis): Impl parse_error instead of From<Error> by @suyanhanx in https://github.com/apache/opendal/pull/3938
* refactor(services/redis): Impl parse_error instead of `From<Error>` by @suyanhanx in https://github.com/apache/opendal/pull/3938
* refactor!: Revert the bump of MSRV to 1.75 by @Xuanwo in https://github.com/apache/opendal/pull/3952
* refactor(services/onedrive): Add OnedriveConfig to implement ConfigDeserializer by @Borber in https://github.com/apache/opendal/pull/3954
* refactor(service/dropbox): Add DropboxConfig by @howiieyu in https://github.com/apache/opendal/pull/3961
Expand Down
7 changes: 5 additions & 2 deletions bin/ofs/src/bin/ofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ async fn main() -> Result<()> {

#[cfg(any(target_os = "linux", target_os = "freebsd"))]
async fn execute(cfg: Config) -> Result<()> {
use std::{collections::HashMap, env, str::FromStr};
use std::collections::HashMap;
use std::env;
use std::str::FromStr;

use anyhow::anyhow;
use ofs::fuse::Fuse;
use opendal::{Operator, Scheme};
use opendal::Operator;
use opendal::Scheme;

if cfg.backend.has_host() {
log::warn!("backend host will be ignored");
Expand Down
2 changes: 0 additions & 2 deletions bin/ofs/src/fuse/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ use std::time::Duration;
use std::time::SystemTime;

use bytes::Bytes;

use fuse3::path::prelude::*;
use fuse3::Errno;
use fuse3::Result;
use futures_util::stream;
use futures_util::stream::BoxStream;
use futures_util::StreamExt;

use opendal::EntryMode;
use opendal::ErrorKind;
use opendal::Metadata;
Expand Down
9 changes: 5 additions & 4 deletions bin/ofs/src/fuse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@

mod adapter;

use adapter::FuseAdapter;
use std::io;
use std::path::Path;

use adapter::FuseAdapter;
use fuse3::path::Session;
pub use fuse3::raw::MountHandle;

use fuse3::{path::Session, MountOptions};
use fuse3::MountOptions;
use opendal::Operator;
use std::{io, path::Path};

/// Ofs fuse filesystem mounter.
#[derive(Debug, Clone)]
Expand Down
3 changes: 2 additions & 1 deletion bin/ofs/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ use opendal::raw::tests;
use opendal::Capability;
use tempfile::TempDir;
use test_context::TestContext;
use tokio::runtime::{self, Runtime};
use tokio::runtime::Runtime;
use tokio::runtime::{self};

static INIT_LOGGER: OnceLock<()> = OnceLock::new();
static RUNTIME: OnceLock<Runtime> = OnceLock::new();
Expand Down
16 changes: 9 additions & 7 deletions bin/ofs/tests/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@

mod common;

use std::{
fs::{self, File, OpenOptions},
io::{Read, Seek, SeekFrom, Write},
thread,
time::Duration,
};
use std::fs::File;
use std::fs::OpenOptions;
use std::fs::{self};
use std::io::Read;
use std::io::Seek;
use std::io::SeekFrom;
use std::io::Write;
use std::thread;
use std::time::Duration;

use common::OfsTestContext;

use test_context::test_context;

static TEST_TEXT: &str = include_str!("../Cargo.toml");
Expand Down
1 change: 0 additions & 1 deletion bin/ofs/tests/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod common;
use std::fs;

use common::OfsTestContext;

use test_context::test_context;
use walkdir::WalkDir;

Expand Down
3 changes: 2 additions & 1 deletion bin/oli/src/commands/cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ use clap::Arg;
use clap::ArgAction;
use clap::ArgMatches;
use clap::Command;
use futures::{AsyncWriteExt, TryStreamExt};
use futures::AsyncWriteExt;
use futures::TryStreamExt;

use crate::config::Config;

Expand Down
18 changes: 12 additions & 6 deletions bin/ovfs/src/virtiofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@
use std::io;
use std::sync::RwLock;

use vhost::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
use vhost::vhost_user::message::VhostUserProtocolFeatures;
use vhost::vhost_user::message::VhostUserVirtioFeatures;
use vhost::vhost_user::Backend;
use vhost_user_backend::{VhostUserBackend, VringMutex, VringState, VringT};
use vhost_user_backend::VhostUserBackend;
use vhost_user_backend::VringMutex;
use vhost_user_backend::VringState;
use vhost_user_backend::VringT;
use virtio_bindings::bindings::virtio_config::VIRTIO_F_VERSION_1;
use virtio_bindings::bindings::virtio_ring::{
VIRTIO_RING_F_EVENT_IDX, VIRTIO_RING_F_INDIRECT_DESC,
};
use vm_memory::{ByteValued, GuestMemoryAtomic, GuestMemoryMmap, Le32};
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_INDIRECT_DESC;
use vm_memory::ByteValued;
use vm_memory::GuestMemoryAtomic;
use vm_memory::GuestMemoryMmap;
use vm_memory::Le32;
use vmm_sys_util::epoll::EventSet;
use vmm_sys_util::eventfd::EventFd;

Expand Down
21 changes: 14 additions & 7 deletions bin/ovfs/src/virtiofs_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,24 @@

use std::cmp::min;
use std::collections::VecDeque;
use std::io::{self, Read, Write};
use std::mem::{size_of, MaybeUninit};
use std::io::Read;
use std::io::Write;
use std::io::{self};
use std::mem::size_of;
use std::mem::MaybeUninit;
use std::ops::Deref;
use std::ptr::copy_nonoverlapping;

use virtio_queue::DescriptorChain;
use vm_memory::bitmap::{Bitmap, BitmapSlice};
use vm_memory::{
Address, ByteValued, GuestMemory, GuestMemoryMmap, GuestMemoryRegion, VolatileMemory,
VolatileSlice,
};
use vm_memory::bitmap::Bitmap;
use vm_memory::bitmap::BitmapSlice;
use vm_memory::Address;
use vm_memory::ByteValued;
use vm_memory::GuestMemory;
use vm_memory::GuestMemoryMmap;
use vm_memory::GuestMemoryRegion;
use vm_memory::VolatileMemory;
use vm_memory::VolatileSlice;

use crate::error::*;

Expand Down
3 changes: 2 additions & 1 deletion bindings/c/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
// specific language governing permissions and limitations
// under the License.

use ::opendal as core;
use std::io::Read;

use ::opendal as core;

use super::*;

/// \brief The result type returned by opendal's reader operation.
Expand Down
3 changes: 2 additions & 1 deletion bindings/c/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
// specific language governing permissions and limitations
// under the License.

use opendal::Buffer;
use std::collections::HashMap;
use std::os::raw::c_char;

use opendal::Buffer;

/// \brief opendal_bytes carries raw-bytes with its length
///
/// The opendal_bytes type is a C-compatible substitute for Vec type
Expand Down
4 changes: 3 additions & 1 deletion bindings/cpp/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
// specific language governing permissions and limitations
// under the License.

use std::io::Read;
use std::io::Seek;

use anyhow::Result;
use opendal as od;
use std::io::{Read, Seek};

use super::ffi;

Expand Down
4 changes: 3 additions & 1 deletion bindings/java/src/async_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ use opendal::Scheme;

use crate::convert::jmap_to_hashmap;
use crate::convert::jstring_to_string;
use crate::executor::{executor_or_default, get_current_env, Executor};
use crate::executor::executor_or_default;
use crate::executor::get_current_env;
use crate::executor::Executor;
use crate::make_entry;
use crate::make_metadata;
use crate::make_operator_info;
Expand Down
6 changes: 4 additions & 2 deletions bindings/java/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ use std::cell::RefCell;
use std::ffi::c_void;
use std::future::Future;

use jni::objects::{JClass, JObject};
use jni::objects::JClass;
use jni::objects::JObject;
use jni::sys::jlong;
use jni::{JNIEnv, JavaVM};
use jni::JNIEnv;
use jni::JavaVM;
use once_cell::sync::OnceCell;
use tokio::task::JoinHandle;

Expand Down
1 change: 0 additions & 1 deletion bindings/java/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use jni::sys::jboolean;
use jni::sys::jint;
use jni::sys::jlong;
use jni::JNIEnv;

use opendal::raw::PresignedRequest;
use opendal::Capability;
use opendal::Entry;
Expand Down
1 change: 0 additions & 1 deletion bindings/java/src/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use jni::sys::jobject;
use jni::sys::jobjectArray;
use jni::sys::jsize;
use jni::JNIEnv;

use opendal::BlockingOperator;

use crate::convert::jstring_to_string;
Expand Down
14 changes: 10 additions & 4 deletions bindings/java/src/operator_input_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
// specific language governing permissions and limitations
// under the License.

use crate::convert::jstring_to_string;
use jni::objects::{JByteArray, JClass, JObject, JString};
use jni::sys::{jbyteArray, jlong};
use jni::objects::JByteArray;
use jni::objects::JClass;
use jni::objects::JObject;
use jni::objects::JString;
use jni::sys::jbyteArray;
use jni::sys::jlong;
use jni::JNIEnv;
use opendal::{BlockingOperator, StdBytesIterator};
use opendal::BlockingOperator;
use opendal::StdBytesIterator;

use crate::convert::jstring_to_string;

/// # Safety
///
Expand Down
8 changes: 5 additions & 3 deletions bindings/java/src/operator_output_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
// specific language governing permissions and limitations
// under the License.

use jni::objects::{JByteArray, JClass, JString};
use jni::objects::JByteArray;
use jni::objects::JClass;
use jni::objects::JString;
use jni::sys::jlong;
use jni::JNIEnv;

use opendal::{BlockingOperator, BlockingWriter};
use opendal::BlockingOperator;
use opendal::BlockingWriter;

use crate::convert::jstring_to_string;

Expand Down
3 changes: 2 additions & 1 deletion bindings/nodejs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ use std::io::Read;
use std::str::FromStr;
use std::time::Duration;

use futures::{AsyncReadExt, TryStreamExt};
use futures::AsyncReadExt;
use futures::TryStreamExt;
use napi::bindgen_prelude::*;

#[napi]
Expand Down
6 changes: 4 additions & 2 deletions bindings/python/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ use std::io::Write;
use std::ops::DerefMut;
use std::sync::Arc;

use futures::{AsyncReadExt, AsyncSeekExt};
use futures::AsyncReadExt;
use futures::AsyncSeekExt;
use pyo3::buffer::PyBuffer;
use pyo3::exceptions::{PyIOError, PyValueError};
use pyo3::exceptions::PyIOError;
use pyo3::exceptions::PyValueError;
use pyo3::prelude::*;
use pyo3_asyncio::tokio::future_into_py;
use tokio::sync::Mutex;
Expand Down
4 changes: 3 additions & 1 deletion core/benches/types/concurrent_tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
// specific language governing permissions and limitations
// under the License.

use criterion::{black_box, BatchSize, Criterion};
use criterion::black_box;
use criterion::BatchSize;
use criterion::Criterion;
use once_cell::sync::Lazy;
use opendal::raw::ConcurrentTasks;
use opendal::Executor;
Expand Down
2 changes: 1 addition & 1 deletion core/src/docs/internals/accessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,6 @@
//! [`Access`]: crate::raw::Access
//! [`Operation`]: crate::raw::Operation
//! [`Capability`]: crate::Capability
//! [`AccessorInfo`]: crate::raw::AccessInfo
//! [`AccessorInfo`]: crate::raw::AccessorInfo
//! [`Scheme`]: crate::Scheme
//! [`Builder`]: crate::Builder
3 changes: 3 additions & 0 deletions core/src/docs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
//!
//! It's highly recommended that you start by reading [`concepts`] first.

#![allow(rustdoc::bare_urls)]

pub mod comparisons;

pub mod concepts;
Expand All @@ -27,6 +29,7 @@ pub mod internals;

/// Changes log for all OpenDAL released versions.
#[doc = include_str!("../../CHANGELOG.md")]
#[cfg(not(doctest))]
pub mod changelog {}

#[cfg(not(doctest))]
Expand Down
1 change: 0 additions & 1 deletion core/src/docs/rfcs/3017_remove_write_copy_from.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Remove the `oio::Write::copy_from()` API pending a more thoughtful design.
In [RFC-2083: Writer Sink API](./2083_writer_sink_api.md), we launched an API, initially named `sink` and changed to `copy_from`, that enables data writing from a `Reader` to a `Writer` object.

The current API signature is:

```rust
pub trait Write: Unpin + Send + Sync {
/// Copies data from the given reader to the writer.
Expand Down
4 changes: 2 additions & 2 deletions core/src/docs/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ There is no public API and raw API changes.

### RFC-2578 Merge Append Into Write

[RFC-2578](crate::docs::rfcs::rfc_2578_merge_append_into_write) merges `append` into `write` and removes `append` API.
[RFC-2578](crate::docs::rfcs::rfc_2758_merge_append_into_write) merges `append` into `write` and removes `append` API.

- For writing a file at once, please use `op.write()` for convenience.
- For appending a file, please use `op.write_with().append(true)` instead of `op.append()`.
Expand Down Expand Up @@ -291,7 +291,7 @@ OpenDAL v0.40 removed the origin `range_read` and `range_reader` interfaces, ple

### RFC-3017 Remove Write Copy From

[RFC-3017](opendal::docs::rfcs::rfc_3017_remove_write_copy_from) removes `copy_from` API from the `oio::Write` trait. Users who implements services and layers by hand should remove this API.
[RFC-3017](crate::docs::rfcs::rfc_3017_remove_write_copy_from) removes `copy_from` API from the `oio::Write` trait. Users who implements services and layers by hand should remove this API.

# Upgrade to v0.39

Expand Down
3 changes: 2 additions & 1 deletion core/src/layers/prometheus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ use prometheus::register_int_counter_vec_with_registry;
use prometheus::HistogramVec;
use prometheus::Registry;

use crate::raw::oio::{ReadOperation, WriteOperation};
use crate::raw::oio::ReadOperation;
use crate::raw::oio::WriteOperation;
use crate::raw::Access;
use crate::raw::*;
use crate::*;
Expand Down
Loading
Loading