From 5ea0c45f666ff4a43feac2266aaacfd44541675b Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sat, 11 May 2019 05:02:39 +0200 Subject: [PATCH] Upgrade rust crates --- rust_crates/.gitignore | 7 +- .../.cargo-ok | 0 .../flatbuffers-0.6.0/.cargo_vcs_info.json | 5 + .../Cargo.toml | 4 +- .../Cargo.toml.orig | 2 +- .../src/builder.rs | 10 +- .../src/endian_scalar.rs | 8 +- .../src/follow.rs | 0 .../src/lib.rs | 0 .../src/primitives.rs | 0 .../src/push.rs | 0 .../src/table.rs | 0 .../src/vector.rs | 6 +- .../src/vtable.rs | 0 .../src/vtable_writer.rs | 0 .../.cargo-ok | 0 .../.gitignore | 0 .../.travis.yml | 0 .../CHANGELOG.md | 0 .../Cargo.toml | 2 +- .../Cargo.toml.orig | 2 +- .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 .../README.md | 0 .../appveyor.yml | 0 .../benches/bilock.rs | 0 .../benches/futures_unordered.rs | 0 .../benches/poll.rs | 0 .../benches/sync_mpsc.rs | 0 .../benches/thread_notify.rs | 0 .../src/executor.rs | 0 .../src/future/and_then.rs | 0 .../src/future/catch_unwind.rs | 0 .../src/future/chain.rs | 0 .../src/future/either.rs | 0 .../src/future/empty.rs | 0 .../src/future/flatten.rs | 0 .../src/future/flatten_stream.rs | 0 .../src/future/from_err.rs | 0 .../src/future/fuse.rs | 0 .../src/future/inspect.rs | 0 .../src/future/into_stream.rs | 0 .../src/future/join.rs | 0 .../src/future/join_all.rs | 0 .../src/future/lazy.rs | 0 .../src/future/loop_fn.rs | 0 .../src/future/map.rs | 0 .../src/future/map_err.rs | 0 .../src/future/mod.rs | 0 .../src/future/option.rs | 0 .../src/future/or_else.rs | 0 .../src/future/poll_fn.rs | 0 .../src/future/result.rs | 0 .../src/future/select.rs | 0 .../src/future/select2.rs | 0 .../src/future/select_all.rs | 0 .../src/future/select_ok.rs | 0 .../src/future/shared.rs | 0 .../src/future/then.rs | 0 .../src/lib.rs | 0 .../src/lock.rs | 0 .../src/poll.rs | 0 .../src/resultstream.rs | 0 .../src/sink/buffer.rs | 0 .../src/sink/fanout.rs | 0 .../src/sink/flush.rs | 0 .../src/sink/from_err.rs | 0 .../src/sink/map_err.rs | 0 .../src/sink/mod.rs | 0 .../src/sink/send.rs | 0 .../src/sink/send_all.rs | 0 .../src/sink/wait.rs | 0 .../src/sink/with.rs | 0 .../src/sink/with_flat_map.rs | 0 .../src/stream/and_then.rs | 0 .../src/stream/buffer_unordered.rs | 0 .../src/stream/buffered.rs | 0 .../src/stream/catch_unwind.rs | 0 .../src/stream/chain.rs | 0 .../src/stream/channel.rs | 0 .../src/stream/chunks.rs | 0 .../src/stream/collect.rs | 0 .../src/stream/concat.rs | 0 .../src/stream/empty.rs | 0 .../src/stream/filter.rs | 0 .../src/stream/filter_map.rs | 0 .../src/stream/flatten.rs | 0 .../src/stream/fold.rs | 0 .../src/stream/for_each.rs | 0 .../src/stream/forward.rs | 0 .../src/stream/from_err.rs | 0 .../src/stream/fuse.rs | 0 .../src/stream/future.rs | 0 .../src/stream/futures_ordered.rs | 0 .../src/stream/futures_unordered.rs | 0 .../src/stream/inspect.rs | 0 .../src/stream/inspect_err.rs | 0 .../src/stream/iter.rs | 0 .../src/stream/iter_ok.rs | 0 .../src/stream/iter_result.rs | 0 .../src/stream/map.rs | 0 .../src/stream/map_err.rs | 0 .../src/stream/merge.rs | 0 .../src/stream/mod.rs | 0 .../src/stream/once.rs | 0 .../src/stream/or_else.rs | 0 .../src/stream/peek.rs | 0 .../src/stream/poll_fn.rs | 0 .../src/stream/repeat.rs | 0 .../src/stream/select.rs | 0 .../src/stream/skip.rs | 0 .../src/stream/skip_while.rs | 0 .../src/stream/split.rs | 0 .../src/stream/take.rs | 0 .../src/stream/take_while.rs | 0 .../src/stream/then.rs | 0 .../src/stream/unfold.rs | 0 .../src/stream/wait.rs | 0 .../src/stream/zip.rs | 0 .../src/sync/bilock.rs | 0 .../src/sync/mod.rs | 0 .../src/sync/mpsc/mod.rs | 0 .../src/sync/mpsc/queue.rs | 0 .../src/sync/oneshot.rs | 0 .../src/task.rs | 2 +- .../src/task_impl/atomic_task.rs | 0 .../src/task_impl/core.rs | 9 + .../src/task_impl/mod.rs | 0 .../src/task_impl/std/data.rs | 0 .../src/task_impl/std/mod.rs | 5 + .../src/task_impl/std/task_rc.rs | 0 .../src/task_impl/std/unpark_mutex.rs | 0 .../src/unsync/mod.rs | 0 .../src/unsync/mpsc.rs | 0 .../src/unsync/oneshot.rs | 0 .../tests/all.rs | 0 .../tests/bilock.rs | 0 .../tests/buffer_unordered.rs | 0 .../tests/channel.rs | 0 .../tests/eager_drop.rs | 0 .../tests/eventual.rs | 0 .../tests/fuse.rs | 0 .../tests/future_flatten_stream.rs | 0 .../tests/futures_ordered.rs | 0 .../tests/futures_unordered.rs | 0 .../tests/inspect.rs | 0 .../tests/mpsc-close.rs | 0 .../tests/mpsc.rs | 0 .../tests/oneshot.rs | 0 .../tests/ready_queue.rs | 0 .../tests/recurse.rs | 0 .../tests/select_all.rs | 0 .../tests/select_ok.rs | 0 .../tests/shared.rs | 0 .../tests/sink.rs | 0 .../tests/split.rs | 0 .../tests/stream.rs | 0 .../tests/stream_catch_unwind.rs | 0 .../tests/support/local_executor.rs | 0 .../tests/support/mod.rs | 0 .../tests/unfold.rs | 0 .../tests/unsync-oneshot.rs | 0 .../tests/unsync.rs | 0 .../hyper-0.12.27/.cargo_vcs_info.json | 5 - .../.cargo-ok | 0 .../hyper-0.12.28/.cargo_vcs_info.json | 5 + .../Cargo.toml | 2 +- .../Cargo.toml.orig | 2 +- .../{hyper-0.12.27 => hyper-0.12.28}/LICENSE | 0 .../src/body/body.rs | 21 +- .../src/body/chunk.rs | 0 .../src/body/mod.rs | 0 .../src/body/payload.rs | 0 .../src/client/conn.rs | 6 +- .../src/client/connect/dns.rs | 0 .../src/client/connect/http.rs | 0 .../src/client/connect/mod.rs | 0 .../src/client/dispatch.rs | 2 +- .../src/client/mod.rs | 4 +- .../src/client/pool.rs | 118 ++-- .../src/client/tests.rs | 5 +- .../src/common/buf.rs | 0 .../src/common/drain.rs | 0 .../src/common/exec.rs | 0 .../src/common/io/mod.rs | 0 .../src/common/io/rewind.rs | 0 .../src/common/lazy.rs | 0 .../src/common/mod.rs | 0 .../src/common/never.rs | 0 .../src/error.rs | 219 +++---- .../src/headers.rs | 0 .../src/lib.rs | 2 +- .../src/mock.rs | 0 .../src/proto/h1/conn.rs | 117 ++-- .../src/proto/h1/date.rs | 0 .../src/proto/h1/decode.rs | 0 .../src/proto/h1/dispatch.rs | 10 +- .../src/proto/h1/encode.rs | 0 .../src/proto/h1/io.rs | 0 .../src/proto/h1/mod.rs | 17 +- .../src/proto/h1/role.rs | 42 +- .../src/proto/h2/client.rs | 52 +- .../src/proto/h2/mod.rs | 2 +- .../src/proto/h2/server.rs | 0 .../src/proto/mod.rs | 0 .../src/rt.rs | 0 .../src/server/conn.rs | 6 +- .../src/server/mod.rs | 0 .../src/server/shutdown.rs | 0 .../src/server/tcp.rs | 0 .../src/service/make_service.rs | 0 .../src/service/mod.rs | 0 .../src/service/new_service.rs | 0 .../src/service/service.rs | 0 .../src/upgrade.rs | 2 +- .../itoa-0.4.3/.cargo_vcs_info.json | 5 - .../itoa-0.4.3/.travis.yml | 25 - .../itoa-0.4.3/README.md | 82 --- .../{itoa-0.4.3 => itoa-0.4.4}/.cargo-ok | 0 .../itoa-0.4.4/.cargo_vcs_info.json | 5 + .../{itoa-0.4.3 => itoa-0.4.4}/.gitignore | 0 .../itoa-0.4.4/.travis.yml | 26 + .../{itoa-0.4.3 => itoa-0.4.4}/Cargo.toml | 4 +- .../Cargo.toml.orig | 2 +- .../{itoa-0.4.3 => itoa-0.4.4}/LICENSE-APACHE | 0 .../{itoa-0.4.3 => itoa-0.4.4}/LICENSE-MIT | 0 .../itoa-0.4.4/README.md | 95 +++ .../benches/bench.rs | 1 - .../{itoa-0.4.3 => itoa-0.4.4}/src/lib.rs | 69 ++- .../{itoa-0.4.3 => itoa-0.4.4}/src/udiv128.rs | 32 +- .../{itoa-0.4.3 => itoa-0.4.4}/tests/test.rs | 1 - .../libc-0.2.51/.cargo_vcs_info.json | 5 - .../{libc-0.2.51 => libc-0.2.54}/.cargo-ok | 0 .../libc-0.2.54/.cargo_vcs_info.json | 5 + .../{libc-0.2.51 => libc-0.2.54}/.cirrus.yml | 0 .../libc-0.2.54/.github/issue_template.md | 24 + .../{libc-0.2.51 => libc-0.2.54}/.gitignore | 0 .../CONTRIBUTING.md | 0 .../{libc-0.2.51 => libc-0.2.54}/Cargo.toml | 4 +- .../Cargo.toml.orig | 2 +- .../LICENSE-APACHE | 0 .../{libc-0.2.51 => libc-0.2.54}/LICENSE-MIT | 0 .../{libc-0.2.51 => libc-0.2.54}/README.md | 0 .../{libc-0.2.51 => libc-0.2.54}/build.rs | 0 .../{libc-0.2.51 => libc-0.2.54}/rustfmt.toml | 0 .../src/cloudabi/aarch64.rs | 0 .../src/cloudabi/arm.rs | 0 .../src/cloudabi/mod.rs | 0 .../src/cloudabi/x86.rs | 0 .../src/cloudabi/x86_64.rs | 0 .../src/fuchsia/aarch64.rs | 0 .../src/fuchsia/align.rs | 0 .../src/fuchsia/mod.rs | 2 +- .../src/fuchsia/no_align.rs | 0 .../src/fuchsia/x86_64.rs | 0 .../src/hermit/aarch64.rs | 0 .../src/hermit/mod.rs | 0 .../src/hermit/x86_64.rs | 0 .../{libc-0.2.51 => libc-0.2.54}/src/lib.rs | 2 +- .../src/macros.rs | 0 .../src/redox/align.rs | 0 .../src/redox/mod.rs | 0 .../src/redox/net.rs | 0 .../src/redox/no_align.rs | 0 .../{libc-0.2.51 => libc-0.2.54}/src/sgx.rs | 0 .../src/switch.rs | 0 .../src/unix/align.rs | 0 .../src/unix/bsd/apple/b32.rs | 0 .../src/unix/bsd/apple/b64.rs | 0 .../src/unix/bsd/apple/mod.rs | 1 + .../src/unix/bsd/freebsdlike/dragonfly/mod.rs | 0 .../unix/bsd/freebsdlike/freebsd/aarch64.rs | 0 .../src/unix/bsd/freebsdlike/freebsd/arm.rs | 0 .../src/unix/bsd/freebsdlike/freebsd/mod.rs | 0 .../unix/bsd/freebsdlike/freebsd/powerpc64.rs | 0 .../src/unix/bsd/freebsdlike/freebsd/x86.rs | 0 .../unix/bsd/freebsdlike/freebsd/x86_64.rs | 0 .../src/unix/bsd/freebsdlike/mod.rs | 1 + .../src/unix/bsd/mod.rs | 2 +- .../src/unix/bsd/netbsdlike/mod.rs | 1 + .../src/unix/bsd/netbsdlike/netbsd/aarch64.rs | 0 .../src/unix/bsd/netbsdlike/netbsd/arm.rs | 0 .../src/unix/bsd/netbsdlike/netbsd/mod.rs | 0 .../src/unix/bsd/netbsdlike/netbsd/powerpc.rs | 0 .../src/unix/bsd/netbsdlike/netbsd/sparc64.rs | 0 .../src/unix/bsd/netbsdlike/netbsd/x86.rs | 0 .../src/unix/bsd/netbsdlike/netbsd/x86_64.rs | 0 .../bsd/netbsdlike/openbsdlike/bitrig/mod.rs | 0 .../bsd/netbsdlike/openbsdlike/bitrig/x86.rs | 0 .../netbsdlike/openbsdlike/bitrig/x86_64.rs | 0 .../unix/bsd/netbsdlike/openbsdlike/mod.rs | 0 .../netbsdlike/openbsdlike/openbsd/aarch64.rs | 0 .../bsd/netbsdlike/openbsdlike/openbsd/mod.rs | 0 .../bsd/netbsdlike/openbsdlike/openbsd/x86.rs | 0 .../netbsdlike/openbsdlike/openbsd/x86_64.rs | 0 .../src/unix/haiku/b32.rs | 0 .../src/unix/haiku/b64.rs | 0 .../src/unix/haiku/mod.rs | 2 +- .../src/unix/hermit/aarch64.rs | 0 .../src/unix/hermit/mod.rs | 0 .../src/unix/hermit/x86_64.rs | 0 .../src/unix/mod.rs | 8 +- .../src/unix/newlib/aarch64/mod.rs | 0 .../src/unix/newlib/align.rs | 0 .../src/unix/newlib/arm/mod.rs | 0 .../src/unix/newlib/mod.rs | 2 +- .../src/unix/newlib/no_align.rs | 0 .../src/unix/no_align.rs | 0 .../src/unix/notbsd/android/b32/arm.rs | 0 .../src/unix/notbsd/android/b32/mod.rs | 0 .../src/unix/notbsd/android/b32/x86.rs | 0 .../src/unix/notbsd/android/b64/aarch64.rs | 0 .../src/unix/notbsd/android/b64/mod.rs | 0 .../src/unix/notbsd/android/b64/x86_64.rs | 0 .../src/unix/notbsd/android/mod.rs | 2 +- .../src/unix/notbsd/emscripten/align.rs | 0 .../src/unix/notbsd/emscripten/mod.rs | 0 .../src/unix/notbsd/emscripten/no_align.rs | 0 .../src/unix/notbsd/linux/align.rs | 0 .../src/unix/notbsd/linux/mips/align.rs | 0 .../src/unix/notbsd/linux/mips/mips32.rs | 0 .../src/unix/notbsd/linux/mips/mips64.rs | 0 .../src/unix/notbsd/linux/mips/mod.rs | 0 .../src/unix/notbsd/linux/mips/no_align.rs | 0 .../src/unix/notbsd/linux/mod.rs | 2 +- .../src/unix/notbsd/linux/musl/b32/arm.rs | 0 .../src/unix/notbsd/linux/musl/b32/mips.rs | 0 .../src/unix/notbsd/linux/musl/b32/mod.rs | 0 .../src/unix/notbsd/linux/musl/b32/powerpc.rs | 0 .../src/unix/notbsd/linux/musl/b32/x86.rs | 0 .../src/unix/notbsd/linux/musl/b64/aarch64.rs | 0 .../src/unix/notbsd/linux/musl/b64/mod.rs | 0 .../unix/notbsd/linux/musl/b64/powerpc64.rs | 0 .../src/unix/notbsd/linux/musl/b64/x86_64.rs | 0 .../src/unix/notbsd/linux/musl/mod.rs | 0 .../src/unix/notbsd/linux/no_align.rs | 0 .../src/unix/notbsd/linux/other/align.rs | 0 .../src/unix/notbsd/linux/other/b32/arm.rs | 0 .../src/unix/notbsd/linux/other/b32/mod.rs | 0 .../unix/notbsd/linux/other/b32/powerpc.rs | 0 .../src/unix/notbsd/linux/other/b32/x86.rs | 0 .../unix/notbsd/linux/other/b64/aarch64.rs | 0 .../src/unix/notbsd/linux/other/b64/mod.rs | 0 .../unix/notbsd/linux/other/b64/not_x32.rs | 0 .../unix/notbsd/linux/other/b64/powerpc64.rs | 0 .../unix/notbsd/linux/other/b64/sparc64.rs | 0 .../src/unix/notbsd/linux/other/b64/x32.rs | 0 .../src/unix/notbsd/linux/other/b64/x86_64.rs | 0 .../src/unix/notbsd/linux/other/mod.rs | 19 + .../src/unix/notbsd/linux/other/no_align.rs | 0 .../src/unix/notbsd/linux/s390x/align.rs | 0 .../src/unix/notbsd/linux/s390x/mod.rs | 0 .../src/unix/notbsd/linux/s390x/no_align.rs | 0 .../src/unix/notbsd/mod.rs | 9 +- .../src/unix/solarish/compat.rs | 0 .../src/unix/solarish/mod.rs | 2 +- .../src/unix/uclibc/align.rs | 0 .../src/unix/uclibc/arm/align.rs | 0 .../src/unix/uclibc/arm/mod.rs | 0 .../src/unix/uclibc/arm/no_align.rs | 0 .../src/unix/uclibc/mips/mips32/align.rs | 0 .../src/unix/uclibc/mips/mips32/mod.rs | 0 .../src/unix/uclibc/mips/mips32/no_align.rs | 0 .../src/unix/uclibc/mips/mips64/align.rs | 0 .../src/unix/uclibc/mips/mips64/mod.rs | 0 .../src/unix/uclibc/mips/mips64/no_align.rs | 0 .../src/unix/uclibc/mips/mod.rs | 0 .../src/unix/uclibc/mod.rs | 2 +- .../src/unix/uclibc/no_align.rs | 0 .../src/unix/uclibc/x86_64/align.rs | 0 .../src/unix/uclibc/x86_64/l4re.rs | 0 .../src/unix/uclibc/x86_64/mod.rs | 0 .../src/unix/uclibc/x86_64/no_align.rs | 0 .../src/unix/uclibc/x86_64/other.rs | 0 .../{libc-0.2.51 => libc-0.2.54}/src/wasi.rs | 562 +++++++++++++++++- .../src/windows/gnu.rs | 0 .../src/windows/mod.rs | 0 .../src/windows/msvc.rs | 0 .../rand_jitter-0.1.3/.cargo_vcs_info.json | 5 - .../.cargo-ok | 0 .../rand_jitter-0.1.4/.cargo_vcs_info.json | 5 + .../CHANGELOG.md | 3 + .../COPYRIGHT | 0 .../Cargo.toml | 6 +- .../Cargo.toml.orig | 4 +- .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 .../README.md | 6 +- .../benches/mod.rs | 0 .../src/dummy_log.rs | 0 .../src/error.rs | 8 +- .../src/lib.rs | 8 +- .../src/platform.rs | 0 .../tests/mod.rs | 0 .../rustyline-3.0.0/.cargo_vcs_info.json | 5 - .../rustyline-3.0.0/src/hint.rs | 16 - .../.cargo-ok | 0 .../rustyline-4.0.0/.cargo_vcs_info.json | 5 + .../.gitignore | 0 .../.travis.yml | 0 .../Cargo.toml | 14 +- .../Cargo.toml.orig | 11 +- .../LICENSE | 0 .../README.md | 20 +- .../TODO.md | 14 +- .../appveyor.yml | 0 .../examples/example.rs | 56 +- .../rustfmt.toml | 0 .../src/completion.rs | 67 ++- .../src/config.rs | 27 + .../src/edit.rs | 197 +++--- .../src/error.rs | 2 +- .../src/highlight.rs | 30 +- .../rustyline-4.0.0/src/hint.rs | 68 +++ .../src/history.rs | 2 +- .../src/keymap.rs | 28 +- .../src/keys.rs | 2 + .../src/kill_ring.rs | 0 .../src/lib.rs | 151 ++--- .../src/line_buffer.rs | 10 +- .../src/test/common.rs | 0 .../src/test/emacs.rs | 0 .../src/test/history.rs | 0 .../src/test/mod.rs | 30 +- .../src/test/vi_cmd.rs | 0 .../src/test/vi_insert.rs | 0 .../src/tty/mod.rs | 18 +- .../src/tty/test.rs | 18 +- .../src/tty/unix.rs | 146 ++++- .../src/tty/windows.rs | 59 +- .../src/undo.rs | 2 +- .../ryu-0.2.7/.cargo_vcs_info.json | 5 - .../ryu-0.2.7/src/lib.rs | 68 --- .../{ryu-0.2.7 => ryu-0.2.8}/.cargo-ok | 0 .../ryu-0.2.8/.cargo_vcs_info.json | 5 + .../{ryu-0.2.7 => ryu-0.2.8}/.gitignore | 0 .../{ryu-0.2.7 => ryu-0.2.8}/.travis.yml | 0 .../{ryu-0.2.7 => ryu-0.2.8}/Cargo.toml | 8 +- .../{ryu-0.2.7 => ryu-0.2.8}/Cargo.toml.orig | 6 +- .../{ryu-0.2.7 => ryu-0.2.8}/LICENSE-APACHE | 0 .../{ryu-0.2.7 => ryu-0.2.8}/LICENSE-BOOST | 0 .../{ryu-0.2.7 => ryu-0.2.8}/README.md | 45 +- .../ryu-0.2.8/benches/bench.rs | 59 ++ .../{ryu-0.2.7 => ryu-0.2.8}/build.rs | 0 .../examples/upstream_benchmark.rs} | 2 + .../src/buffer/mod.rs | 2 +- .../{ryu-0.2.7 => ryu-0.2.8}/src/common.rs | 12 +- .../{ryu-0.2.7 => ryu-0.2.8}/src/d2s.rs | 25 +- .../src/d2s_full_table.rs | 0 .../src/d2s_intrinsics.rs | 0 .../src/d2s_small_table.rs | 8 +- .../src/digit_table.rs | 0 .../{ryu-0.2.7 => ryu-0.2.8}/src/f2s.rs | 29 +- .../ryu-0.2.8/src/lib.rs | 126 ++++ .../src/pretty/exponent.rs | 0 .../src/pretty/mantissa.rs | 0 .../src/pretty/mod.rs | 4 +- .../tests/d2s_table_test.rs | 0 .../tests/d2s_test.rs | 0 .../tests/exhaustive.rs | 0 .../tests/f2s_test.rs | 0 .../tests/macros/mod.rs | 0 .../serde-1.0.90/.cargo_vcs_info.json | 5 - .../{serde-1.0.90 => serde-1.0.91}/.cargo-ok | 0 .../serde-1.0.91/.cargo_vcs_info.json | 5 + .../{serde-1.0.90 => serde-1.0.91}/Cargo.toml | 2 +- .../Cargo.toml.orig | 2 +- .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 .../{serde-1.0.90 => serde-1.0.91}/README.md | 0 .../{serde-1.0.90 => serde-1.0.91}/build.rs | 0 .../crates-io.md | 0 .../src/de/from_primitive.rs | 0 .../src/de/ignored_any.rs | 0 .../src/de/impls.rs | 0 .../src/de/mod.rs | 0 .../src/de/utf8.rs | 0 .../src/de/value.rs | 120 +++- .../src/export.rs | 0 .../src/integer128.rs | 0 .../{serde-1.0.90 => serde-1.0.91}/src/lib.rs | 4 +- .../src/macros.rs | 0 .../src/private/de.rs | 0 .../src/private/macros.rs | 0 .../src/private/mod.rs | 0 .../src/private/ser.rs | 0 .../src/ser/impls.rs | 0 .../src/ser/impossible.rs | 0 .../src/ser/mod.rs | 0 .../signal-hook-0.1.8/.cargo_vcs_info.json | 5 - .../signal-hook-0.1.8/.travis.yml | 29 - .../.cargo-ok | 0 .../signal-hook-0.1.9/.cargo_vcs_info.json | 5 + .../.gitignore | 0 .../signal-hook-0.1.9/.travis.yml | 32 + .../CHANGELOG.md | 7 + .../Cargo.toml | 10 +- .../Cargo.toml.orig | 12 +- .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 .../README.md | 0 .../rustfmt.toml | 0 .../src/flag.rs | 0 .../src/iterator.rs | 2 +- .../signal-hook-0.1.9/src/lib.rs | 141 +++++ .../src/pipe.rs | 0 .../tests/iterator.rs | 0 .../tests/tokio.rs | 0 .../tests/version.rs | 0 .../.cargo-ok | 0 .../.cargo_vcs_info.json | 5 + .../signal-hook-registry-1.0.1/Cargo.toml | 37 ++ .../Cargo.toml.orig | 22 + .../LICENSE-APACHE | 0 .../signal-hook-registry-1.0.1/LICENSE-MIT | 25 + .../signal-hook-registry-1.0.1/README.md | 24 + .../src/lib.rs | 278 ++++----- .../tests/version.rs | 12 + .../socket2-0.3.8/.travis.yml | 36 -- .../.appveyor.yml | 0 .../socket2-0.3.9/.cargo-ok | 1 + .../socket2-0.3.9/.cargo_vcs_info.json | 5 + .../.gitignore | 0 .../socket2-0.3.9/.travis.yml | 35 ++ .../Cargo.toml | 4 +- .../Cargo.toml.orig | 2 +- .../socket2-0.3.9/LICENSE-APACHE | 201 +++++++ .../LICENSE-MIT | 0 .../README.md | 2 +- .../src/lib.rs | 0 .../src/sockaddr.rs | 2 +- .../src/socket.rs | 12 + .../src/sys/redox/mod.rs | 0 .../src/sys/unix/mod.rs | 0 .../src/sys/unix/weak.rs | 0 .../src/sys/windows.rs | 4 +- .../src/utils.rs | 0 .../utime-0.2.1/.cargo-ok | 1 + 538 files changed, 3019 insertions(+), 1224 deletions(-) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/Cargo.toml (93%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/Cargo.toml.orig (96%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/builder.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/endian_scalar.rs (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/follow.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/lib.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/primitives.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/push.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/table.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/vector.rs (96%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/vtable.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{flatbuffers-0.5.0 => flatbuffers-0.6.0}/src/vtable_writer.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/.cargo-ok (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/.gitignore (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/.travis.yml (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/CHANGELOG.md (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/Cargo.toml (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/Cargo.toml.orig (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/LICENSE-APACHE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/LICENSE-MIT (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/README.md (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/appveyor.yml (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/benches/bilock.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/benches/futures_unordered.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/benches/poll.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/benches/sync_mpsc.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/benches/thread_notify.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/executor.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/and_then.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/catch_unwind.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/chain.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/either.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/empty.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/flatten.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/flatten_stream.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/from_err.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/fuse.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/inspect.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/into_stream.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/join.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/join_all.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/lazy.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/loop_fn.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/map.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/map_err.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/option.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/or_else.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/poll_fn.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/result.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/select.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/select2.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/select_all.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/select_ok.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/shared.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/future/then.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/lib.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/lock.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/poll.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/resultstream.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/buffer.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/fanout.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/flush.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/from_err.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/map_err.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/send.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/send_all.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/wait.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/with.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sink/with_flat_map.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/and_then.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/buffer_unordered.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/buffered.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/catch_unwind.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/chain.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/channel.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/chunks.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/collect.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/concat.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/empty.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/filter.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/filter_map.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/flatten.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/fold.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/for_each.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/forward.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/from_err.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/fuse.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/future.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/futures_ordered.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/futures_unordered.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/inspect.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/inspect_err.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/iter.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/iter_ok.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/iter_result.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/map.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/map_err.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/merge.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/once.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/or_else.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/peek.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/poll_fn.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/repeat.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/select.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/skip.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/skip_while.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/split.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/take.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/take_while.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/then.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/unfold.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/wait.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/stream/zip.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sync/bilock.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sync/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sync/mpsc/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sync/mpsc/queue.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/sync/oneshot.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/task.rs (96%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/task_impl/atomic_task.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/task_impl/core.rs (96%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/task_impl/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/task_impl/std/data.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/task_impl/std/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/task_impl/std/task_rc.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/task_impl/std/unpark_mutex.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/unsync/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/unsync/mpsc.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/src/unsync/oneshot.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/all.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/bilock.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/buffer_unordered.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/channel.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/eager_drop.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/eventual.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/fuse.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/future_flatten_stream.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/futures_ordered.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/futures_unordered.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/inspect.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/mpsc-close.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/mpsc.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/oneshot.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/ready_queue.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/recurse.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/select_all.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/select_ok.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/shared.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/sink.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/split.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/stream.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/stream_catch_unwind.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/support/local_executor.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/support/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/unfold.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/unsync-oneshot.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{futures-0.1.26 => futures-0.1.27}/tests/unsync.rs (100%) delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/Cargo.toml (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/Cargo.toml.orig (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/LICENSE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/body/body.rs (95%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/body/chunk.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/body/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/body/payload.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/client/conn.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/client/connect/dns.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/client/connect/http.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/client/connect/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/client/dispatch.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/client/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/client/pool.rs (95%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/client/tests.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/common/buf.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/common/drain.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/common/exec.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/common/io/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/common/io/rewind.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/common/lazy.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/common/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/common/never.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/error.rs (68%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/headers.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/lib.rs (96%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/mock.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h1/conn.rs (93%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h1/date.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h1/decode.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h1/dispatch.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h1/encode.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h1/io.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h1/mod.rs (85%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h1/role.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h2/client.rs (77%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h2/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/h2/server.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/proto/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/rt.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/server/conn.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/server/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/server/shutdown.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/server/tcp.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/service/make_service.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/service/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/service/new_service.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/service/service.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{hyper-0.12.27 => hyper-0.12.28}/src/upgrade.rs (98%) delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.cargo_vcs_info.json delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.travis.yml delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/README.md rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/.gitignore (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.travis.yml rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/Cargo.toml (93%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/Cargo.toml.orig (89%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/LICENSE-APACHE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/LICENSE-MIT (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/README.md rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/benches/bench.rs (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/src/lib.rs (83%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/src/udiv128.rs (58%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{itoa-0.4.3 => itoa-0.4.4}/tests/test.rs (96%) delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/.cirrus.yml (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.github/issue_template.md rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/.gitignore (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/CONTRIBUTING.md (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/Cargo.toml (95%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/Cargo.toml.orig (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/LICENSE-APACHE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/LICENSE-MIT (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/README.md (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/build.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/rustfmt.toml (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/cloudabi/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/cloudabi/arm.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/cloudabi/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/cloudabi/x86.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/cloudabi/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/fuchsia/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/fuchsia/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/fuchsia/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/fuchsia/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/fuchsia/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/hermit/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/hermit/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/hermit/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/lib.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/macros.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/redox/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/redox/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/redox/net.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/redox/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/sgx.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/switch.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/apple/b32.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/apple/b64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/apple/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/freebsdlike/dragonfly/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/freebsdlike/freebsd/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/freebsdlike/freebsd/arm.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/freebsdlike/freebsd/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/freebsdlike/freebsd/x86.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/freebsdlike/freebsd/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/freebsdlike/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/netbsd/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/netbsd/arm.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/netbsd/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/netbsd/powerpc.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/netbsd/sparc64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/netbsd/x86.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/netbsd/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/openbsdlike/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/haiku/b32.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/haiku/b64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/haiku/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/hermit/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/hermit/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/hermit/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/newlib/aarch64/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/newlib/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/newlib/arm/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/newlib/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/newlib/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/android/b32/arm.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/android/b32/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/android/b32/x86.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/android/b64/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/android/b64/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/android/b64/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/android/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/emscripten/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/emscripten/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/emscripten/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/mips/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/mips/mips32.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/mips/mips64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/mips/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/mips/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b32/arm.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b32/mips.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b32/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b32/powerpc.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b32/x86.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b64/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b64/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b64/powerpc64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/b64/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/musl/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b32/arm.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b32/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b32/powerpc.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b32/x86.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b64/aarch64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b64/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b64/not_x32.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b64/powerpc64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b64/sparc64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b64/x32.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/b64/x86_64.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/mod.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/other/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/s390x/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/s390x/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/linux/s390x/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/notbsd/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/solarish/compat.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/solarish/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/arm/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/arm/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/arm/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/mips/mips32/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/mips/mips32/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/mips/mips32/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/mips/mips64/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/mips/mips64/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/mips/mips64/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/mips/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/x86_64/align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/x86_64/l4re.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/x86_64/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/x86_64/no_align.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/unix/uclibc/x86_64/other.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/wasi.rs (57%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/windows/gnu.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/windows/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{libc-0.2.51 => libc-0.2.54}/src/windows/msvc.rs (100%) delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/CHANGELOG.md (87%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/COPYRIGHT (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/Cargo.toml (92%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/Cargo.toml.orig (94%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/LICENSE-APACHE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/LICENSE-MIT (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/README.md (94%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/benches/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/src/dummy_log.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/src/error.rs (87%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/src/lib.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/src/platform.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rand_jitter-0.1.3 => rand_jitter-0.1.4}/tests/mod.rs (100%) delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.cargo_vcs_info.json delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/hint.rs rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/.gitignore (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/.travis.yml (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/Cargo.toml (88%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/Cargo.toml.orig (85%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/LICENSE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/README.md (92%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/TODO.md (77%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/appveyor.yml (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/examples/example.rs (65%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/rustfmt.toml (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/completion.rs (91%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/config.rs (93%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/edit.rs (76%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/error.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/highlight.rs (90%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/hint.rs rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/history.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/keymap.rs (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/keys.rs (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/kill_ring.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/lib.rs (90%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/line_buffer.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/test/common.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/test/emacs.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/test/history.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/test/mod.rs (83%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/test/vi_cmd.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/test/vi_insert.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/tty/mod.rs (93%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/tty/test.rs (90%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/tty/unix.rs (86%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/tty/windows.rs (95%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{rustyline-3.0.0 => rustyline-4.0.0}/src/undo.rs (99%) delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.cargo_vcs_info.json delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/lib.rs rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/.gitignore (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/.travis.yml (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/Cargo.toml (88%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/Cargo.toml.orig (90%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/LICENSE-APACHE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/LICENSE-BOOST (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/README.md (63%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/benches/bench.rs rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/build.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7/benchmark/benchmark.rs => ryu-0.2.8/examples/upstream_benchmark.rs} (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/buffer/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/common.rs (90%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/d2s.rs (96%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/d2s_full_table.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/d2s_intrinsics.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/d2s_small_table.rs (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/digit_table.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/f2s.rs (95%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/lib.rs rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/pretty/exponent.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/pretty/mantissa.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/src/pretty/mod.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/tests/d2s_table_test.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/tests/d2s_test.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/tests/exhaustive.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/tests/f2s_test.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{ryu-0.2.7 => ryu-0.2.8}/tests/macros/mod.rs (100%) delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/Cargo.toml (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/Cargo.toml.orig (97%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/LICENSE-APACHE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/LICENSE-MIT (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/README.md (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/build.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/crates-io.md (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/de/from_primitive.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/de/ignored_any.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/de/impls.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/de/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/de/utf8.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/de/value.rs (92%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/export.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/integer128.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/lib.rs (98%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/macros.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/private/de.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/private/macros.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/private/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/private/ser.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/ser/impls.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/ser/impossible.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{serde-1.0.90 => serde-1.0.91}/src/ser/mod.rs (100%) delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.cargo_vcs_info.json delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.travis.yml rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/.gitignore (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.travis.yml rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/CHANGELOG.md (80%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/Cargo.toml (94%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/Cargo.toml.orig (82%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/LICENSE-APACHE (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/LICENSE-MIT (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/README.md (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/rustfmt.toml (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/src/flag.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/src/iterator.rs (99%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/lib.rs rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/src/pipe.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/tests/iterator.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/tests/tokio.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-0.1.9}/tests/version.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => signal-hook-registry-1.0.1}/.cargo-ok (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/.cargo_vcs_info.json create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/Cargo.toml create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/Cargo.toml.orig rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => signal-hook-registry-1.0.1}/LICENSE-APACHE (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/LICENSE-MIT create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/README.md rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{signal-hook-0.1.8 => signal-hook-registry-1.0.1}/src/lib.rs (67%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/tests/version.rs delete mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.travis.yml rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/.appveyor.yml (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.cargo-ok create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.cargo_vcs_info.json rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/.gitignore (100%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.travis.yml rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/Cargo.toml (95%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/Cargo.toml.orig (97%) create mode 100644 rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/LICENSE-APACHE rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/LICENSE-MIT (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/README.md (85%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/src/lib.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/src/sockaddr.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/src/socket.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/src/sys/redox/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/src/sys/unix/mod.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/src/sys/unix/weak.rs (100%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/src/sys/windows.rs (99%) rename rust_crates/registry/src/github.com-1ecc6299db9ec823/{socket2-0.3.8 => socket2-0.3.9}/src/utils.rs (100%) diff --git a/rust_crates/.gitignore b/rust_crates/.gitignore index abf924ba0b..5652d471f3 100644 --- a/rust_crates/.gitignore +++ b/rust_crates/.gitignore @@ -5,7 +5,7 @@ /registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.15/ /registry/src/github.com-1ecc6299db9ec823/backtrace-sys-0.1.28/ /registry/src/github.com-1ecc6299db9ec823/blake2-rfc-0.2.18/ -/registry/src/github.com-1ecc6299db9ec823/cc-1.0.35/ +/registry/src/github.com-1ecc6299db9ec823/cc-1.0.36/ /registry/src/github.com-1ecc6299db9ec823/cloudabi-0.0.3/ /registry/src/github.com-1ecc6299db9ec823/constant_time_eq-0.1.3/ /registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/ @@ -13,10 +13,9 @@ /registry/src/github.com-1ecc6299db9ec823/fuchsia-cprng-0.1.1/ /registry/src/github.com-1ecc6299db9ec823/fuchsia-zircon-0.3.3/ /registry/src/github.com-1ecc6299db9ec823/fuchsia-zircon-sys-0.3.3/ -/registry/src/github.com-1ecc6299db9ec823/nix-0.11.0/ /registry/src/github.com-1ecc6299db9ec823/numtoa-0.1.0/ /registry/src/github.com-1ecc6299db9ec823/owning_ref-0.4.0/ -/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.28/ +/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.30/ /registry/src/github.com-1ecc6299db9ec823/quote-0.6.12/ /registry/src/github.com-1ecc6299db9ec823/rand-0.4.6/ /registry/src/github.com-1ecc6299db9ec823/rand_core-0.3.1/ @@ -30,7 +29,7 @@ /registry/src/github.com-1ecc6299db9ec823/semver-0.9.0/ /registry/src/github.com-1ecc6299db9ec823/semver-parser-0.7.0/ /registry/src/github.com-1ecc6299db9ec823/stable_deref_trait-1.1.1/ -/registry/src/github.com-1ecc6299db9ec823/syn-0.15.32/ +/registry/src/github.com-1ecc6299db9ec823/syn-0.15.34/ /registry/src/github.com-1ecc6299db9ec823/synstructure-0.10.1/ /registry/src/github.com-1ecc6299db9ec823/termion-1.5.2/ /registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.1.0/ diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/.cargo_vcs_info.json new file mode 100644 index 0000000000..70f27b8904 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "9936adf473978c0934e7734cb506887f6fc0b025" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/Cargo.toml similarity index 93% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/Cargo.toml index 12e860aa75..e56665804e 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "flatbuffers" -version = "0.5.0" +version = "0.6.0" authors = ["Robert Winslow ", "FlatBuffers Maintainers"] description = "Official FlatBuffers Rust runtime library." homepage = "https://google.github.io/flatbuffers/" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/Cargo.toml.orig similarity index 96% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/Cargo.toml.orig index 67bbd8d06c..32d9b1b805 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "flatbuffers" -version = "0.5.0" +version = "0.6.0" authors = ["Robert Winslow ", "FlatBuffers Maintainers"] license = "Apache-2.0" description = "Official FlatBuffers Rust runtime library." diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/builder.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/builder.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/builder.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/builder.rs index 698817e047..f755a49873 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/builder.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/builder.rs @@ -29,6 +29,8 @@ use vtable::{VTable, field_index_to_field_offset}; use vtable_writer::VTableWriter; use vector::{SafeSliceAccess, Vector}; +pub const N_SMALLVEC_STRING_VECTOR_CAPACITY: usize = 16; + #[derive(Clone, Copy, Debug)] struct FieldLoc { off: UOffsetT, @@ -268,10 +270,12 @@ impl<'fbb> FlatBufferBuilder<'fbb> { #[inline] pub fn create_vector_of_strings<'a, 'b>(&'a mut self, xs: &'b [&'b str]) -> WIPOffset>> { self.assert_not_nested("create_vector_of_strings can not be called when a table or vector is under construction"); - // internally, smallvec can be a stack-allocated or heap-allocated vector. - // we expect it to usually be stack-allocated. - let mut offsets: smallvec::SmallVec<[WIPOffset<&str>; 0]> = smallvec::SmallVec::with_capacity(xs.len()); + // internally, smallvec can be a stack-allocated or heap-allocated vector: + // if xs.len() > N_SMALLVEC_STRING_VECTOR_CAPACITY then it will overflow to the heap. + let mut offsets: smallvec::SmallVec<[WIPOffset<&str>; N_SMALLVEC_STRING_VECTOR_CAPACITY]> = smallvec::SmallVec::with_capacity(xs.len()); unsafe { offsets.set_len(xs.len()); } + + // note that this happens in reverse, because the buffer is built back-to-front: for (i, &s) in xs.iter().enumerate().rev() { let o = self.create_string(s); offsets[i] = o; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/endian_scalar.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/endian_scalar.rs similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/endian_scalar.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/endian_scalar.rs index 00f2ebef49..3e7244e09b 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/endian_scalar.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/endian_scalar.rs @@ -88,7 +88,7 @@ impl EndianScalar for f32 { } #[cfg(not(target_endian = "little"))] { - byte_swap_f32(&self) + byte_swap_f32(self) } } /// Convert f32 from little-endian to host endian-ness. @@ -100,7 +100,7 @@ impl EndianScalar for f32 { } #[cfg(not(target_endian = "little"))] { - byte_swap_f32(&self) + byte_swap_f32(self) } } } @@ -115,7 +115,7 @@ impl EndianScalar for f64 { } #[cfg(not(target_endian = "little"))] { - byte_swap_f64(&self) + byte_swap_f64(self) } } /// Convert f64 from little-endian to host endian-ness. @@ -127,7 +127,7 @@ impl EndianScalar for f64 { } #[cfg(not(target_endian = "little"))] { - byte_swap_f64(&self) + byte_swap_f64(self) } } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/follow.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/follow.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/follow.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/follow.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/lib.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/lib.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/primitives.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/primitives.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/primitives.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/primitives.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/push.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/push.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/push.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/push.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/table.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/table.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/table.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/table.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/vector.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/vector.rs similarity index 96% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/vector.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/vector.rs index 8c2d6d5091..397089a664 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/vector.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/vector.rs @@ -19,7 +19,9 @@ use std::mem::size_of; use std::slice::from_raw_parts; use std::str::from_utf8_unchecked; -use endian_scalar::{EndianScalar, read_scalar}; +#[cfg(target_endian = "little")] +use endian_scalar::EndianScalar; +use endian_scalar::read_scalar; use follow::Follow; use primitives::*; @@ -85,6 +87,7 @@ mod le_safe_slice_impls { impl super::SafeSliceAccess for f64 {} } +#[cfg(target_endian = "little")] pub use self::le_safe_slice_impls::*; pub fn follow_cast_ref<'a, T: Sized + 'a>(buf: &'a [u8], loc: usize) -> &'a T { @@ -104,6 +107,7 @@ impl<'a> Follow<'a> for &'a str { } } +#[cfg(target_endian = "little")] fn follow_slice_helper(buf: &[u8], loc: usize) -> &[T] { let sz = size_of::(); debug_assert!(sz > 0); diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/vtable.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/vtable.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/vtable.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/vtable.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/vtable_writer.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/vtable_writer.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.5.0/src/vtable_writer.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/flatbuffers-0.6.0/src/vtable_writer.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/.gitignore b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/.gitignore similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/.gitignore rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/.gitignore diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/.travis.yml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/.travis.yml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/.travis.yml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/CHANGELOG.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/CHANGELOG.md similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/CHANGELOG.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/CHANGELOG.md diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/Cargo.toml similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/Cargo.toml index 05ea044272..53369f152e 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "futures" -version = "0.1.26" +version = "0.1.27" authors = ["Alex Crichton "] description = "An implementation of futures and streams featuring zero allocations,\ncomposability, and iterator-like interfaces.\n" homepage = "https://github.com/rust-lang-nursery/futures-rs" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/Cargo.toml.orig similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/Cargo.toml.orig index 37bff58b54..9c46b75285 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "futures" -version = "0.1.26" +version = "0.1.27" authors = ["Alex Crichton "] license = "MIT/Apache-2.0" readme = "README.md" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/LICENSE-APACHE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/LICENSE-APACHE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/LICENSE-APACHE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/LICENSE-MIT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/LICENSE-MIT similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/LICENSE-MIT rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/LICENSE-MIT diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/README.md similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/README.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/README.md diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/appveyor.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/appveyor.yml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/appveyor.yml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/appveyor.yml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/bilock.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/bilock.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/bilock.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/bilock.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/futures_unordered.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/futures_unordered.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/futures_unordered.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/futures_unordered.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/poll.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/poll.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/poll.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/poll.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/sync_mpsc.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/sync_mpsc.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/sync_mpsc.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/sync_mpsc.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/thread_notify.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/thread_notify.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/benches/thread_notify.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/benches/thread_notify.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/executor.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/executor.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/executor.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/executor.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/and_then.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/and_then.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/and_then.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/and_then.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/catch_unwind.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/catch_unwind.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/catch_unwind.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/catch_unwind.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/chain.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/chain.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/chain.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/chain.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/either.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/either.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/either.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/either.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/empty.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/empty.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/empty.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/empty.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/flatten.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/flatten.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/flatten.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/flatten.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/flatten_stream.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/flatten_stream.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/flatten_stream.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/flatten_stream.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/from_err.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/from_err.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/from_err.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/from_err.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/fuse.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/fuse.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/fuse.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/fuse.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/inspect.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/inspect.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/inspect.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/inspect.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/into_stream.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/into_stream.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/into_stream.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/into_stream.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/join.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/join.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/join.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/join.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/join_all.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/join_all.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/join_all.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/join_all.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/lazy.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/lazy.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/lazy.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/lazy.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/loop_fn.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/loop_fn.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/loop_fn.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/loop_fn.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/map.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/map.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/map.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/map.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/map_err.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/map_err.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/map_err.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/map_err.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/option.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/option.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/option.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/option.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/or_else.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/or_else.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/or_else.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/or_else.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/poll_fn.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/poll_fn.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/poll_fn.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/poll_fn.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/result.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/result.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/result.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/result.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/select.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/select.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/select.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/select.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/select2.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/select2.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/select2.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/select2.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/select_all.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/select_all.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/select_all.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/select_all.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/select_ok.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/select_ok.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/select_ok.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/select_ok.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/shared.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/shared.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/shared.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/shared.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/then.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/then.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/future/then.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/future/then.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/lib.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/lib.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/lock.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/lock.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/lock.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/lock.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/poll.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/poll.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/poll.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/poll.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/resultstream.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/resultstream.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/resultstream.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/resultstream.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/buffer.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/buffer.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/buffer.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/buffer.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/fanout.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/fanout.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/fanout.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/fanout.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/flush.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/flush.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/flush.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/flush.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/from_err.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/from_err.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/from_err.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/from_err.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/map_err.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/map_err.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/map_err.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/map_err.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/send.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/send.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/send.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/send.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/send_all.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/send_all.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/send_all.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/send_all.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/wait.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/wait.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/wait.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/wait.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/with.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/with.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/with.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/with.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/with_flat_map.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/with_flat_map.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sink/with_flat_map.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sink/with_flat_map.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/and_then.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/and_then.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/and_then.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/and_then.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/buffer_unordered.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/buffer_unordered.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/buffer_unordered.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/buffer_unordered.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/buffered.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/buffered.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/buffered.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/buffered.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/catch_unwind.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/catch_unwind.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/catch_unwind.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/catch_unwind.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/chain.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/chain.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/chain.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/chain.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/channel.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/channel.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/channel.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/channel.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/chunks.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/chunks.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/chunks.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/chunks.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/collect.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/collect.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/collect.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/collect.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/concat.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/concat.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/concat.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/concat.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/empty.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/empty.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/empty.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/empty.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/filter.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/filter.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/filter.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/filter.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/filter_map.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/filter_map.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/filter_map.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/filter_map.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/flatten.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/flatten.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/flatten.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/flatten.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/fold.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/fold.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/fold.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/fold.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/for_each.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/for_each.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/for_each.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/for_each.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/forward.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/forward.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/forward.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/forward.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/from_err.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/from_err.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/from_err.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/from_err.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/fuse.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/fuse.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/fuse.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/fuse.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/future.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/future.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/future.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/future.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/futures_ordered.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/futures_ordered.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/futures_ordered.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/futures_ordered.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/futures_unordered.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/futures_unordered.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/futures_unordered.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/futures_unordered.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/inspect.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/inspect.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/inspect.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/inspect.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/inspect_err.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/inspect_err.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/inspect_err.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/inspect_err.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/iter.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/iter.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/iter.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/iter.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/iter_ok.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/iter_ok.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/iter_ok.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/iter_ok.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/iter_result.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/iter_result.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/iter_result.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/iter_result.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/map.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/map.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/map.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/map.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/map_err.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/map_err.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/map_err.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/map_err.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/merge.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/merge.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/merge.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/merge.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/once.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/once.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/once.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/once.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/or_else.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/or_else.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/or_else.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/or_else.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/peek.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/peek.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/peek.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/peek.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/poll_fn.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/poll_fn.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/poll_fn.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/poll_fn.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/repeat.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/repeat.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/repeat.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/repeat.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/select.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/select.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/select.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/select.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/skip.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/skip.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/skip.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/skip.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/skip_while.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/skip_while.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/skip_while.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/skip_while.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/split.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/split.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/split.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/split.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/take.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/take.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/take.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/take.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/take_while.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/take_while.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/take_while.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/take_while.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/then.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/then.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/then.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/then.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/unfold.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/unfold.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/unfold.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/unfold.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/wait.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/wait.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/wait.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/wait.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/zip.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/zip.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/stream/zip.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/stream/zip.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/bilock.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/bilock.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/bilock.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/bilock.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/mpsc/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/mpsc/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/mpsc/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/mpsc/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/mpsc/queue.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/mpsc/queue.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/mpsc/queue.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/mpsc/queue.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/oneshot.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/oneshot.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/sync/oneshot.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/sync/oneshot.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task.rs similarity index 96% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task.rs index 941f227dd3..f83f2c4719 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task.rs @@ -33,7 +33,7 @@ #[allow(deprecated)] pub use task_impl::{Spawn, spawn, Unpark, Executor, Run, park}; -pub use task_impl::{Task, AtomicTask, current, init}; +pub use task_impl::{Task, AtomicTask, current, init, is_in_task}; #[allow(deprecated)] #[cfg(feature = "use_std")] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/atomic_task.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/atomic_task.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/atomic_task.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/atomic_task.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/core.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/core.rs similarity index 96% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/core.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/core.rs index 356cd8909d..d454116012 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/core.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/core.rs @@ -140,6 +140,15 @@ pub unsafe fn init(get: fn() -> *mut u8, set: fn(*mut u8)) -> bool { } } +/// Return whether the caller is running in a task (and so can use task_local!). +pub fn is_in_task() -> bool { + if let Some(ptr) = get_ptr() { + !ptr.is_null() + } else { + false + } +} + #[inline] pub fn get_ptr() -> Option<*mut u8> { match GET.load(Relaxed) { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/data.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/data.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/data.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/data.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/mod.rs index db51969e7d..eca750f7d8 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/mod.rs @@ -27,6 +27,11 @@ pub use task_impl::core::init; thread_local!(static CURRENT_TASK: Cell<*mut u8> = Cell::new(ptr::null_mut())); +/// Return whether the caller is running in a task (and so can use task_local!). +pub fn is_in_task() -> bool { + CURRENT_TASK.with(|task| !task.get().is_null()) +} + static INIT: Once = ONCE_INIT; pub fn get_ptr() -> Option<*mut u8> { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/task_rc.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/task_rc.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/task_rc.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/task_rc.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/unpark_mutex.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/unpark_mutex.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/task_impl/std/unpark_mutex.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/task_impl/std/unpark_mutex.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/unsync/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/unsync/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/unsync/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/unsync/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/unsync/mpsc.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/unsync/mpsc.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/unsync/mpsc.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/unsync/mpsc.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/unsync/oneshot.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/unsync/oneshot.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/src/unsync/oneshot.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/src/unsync/oneshot.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/all.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/all.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/all.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/all.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/bilock.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/bilock.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/bilock.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/bilock.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/buffer_unordered.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/buffer_unordered.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/buffer_unordered.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/buffer_unordered.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/channel.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/channel.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/channel.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/channel.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/eager_drop.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/eager_drop.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/eager_drop.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/eager_drop.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/eventual.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/eventual.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/eventual.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/eventual.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/fuse.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/fuse.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/fuse.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/fuse.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/future_flatten_stream.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/future_flatten_stream.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/future_flatten_stream.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/future_flatten_stream.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/futures_ordered.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/futures_ordered.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/futures_ordered.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/futures_ordered.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/futures_unordered.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/futures_unordered.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/futures_unordered.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/futures_unordered.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/inspect.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/inspect.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/inspect.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/inspect.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/mpsc-close.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/mpsc-close.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/mpsc-close.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/mpsc-close.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/mpsc.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/mpsc.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/mpsc.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/mpsc.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/oneshot.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/oneshot.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/oneshot.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/oneshot.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/ready_queue.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/ready_queue.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/ready_queue.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/ready_queue.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/recurse.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/recurse.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/recurse.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/recurse.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/select_all.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/select_all.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/select_all.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/select_all.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/select_ok.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/select_ok.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/select_ok.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/select_ok.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/shared.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/shared.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/shared.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/shared.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/sink.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/sink.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/sink.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/sink.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/split.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/split.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/split.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/split.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/stream.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/stream.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/stream.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/stream.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/stream_catch_unwind.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/stream_catch_unwind.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/stream_catch_unwind.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/stream_catch_unwind.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/support/local_executor.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/support/local_executor.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/support/local_executor.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/support/local_executor.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/support/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/support/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/support/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/support/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/unfold.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/unfold.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/unfold.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/unfold.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/unsync-oneshot.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/unsync-oneshot.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/unsync-oneshot.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/unsync-oneshot.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/unsync.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/unsync.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.26/tests/unsync.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/futures-0.1.27/tests/unsync.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/.cargo_vcs_info.json deleted file mode 100644 index 516c90e755..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/.cargo_vcs_info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "git": { - "sha1": "0f33354569e9724782f21741a28e7178a3ad43ed" - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/.cargo_vcs_info.json new file mode 100644 index 0000000000..bee24b4b56 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "778421eb94f9c194bafb1f5a62723cf4ef9bca06" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/Cargo.toml similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/Cargo.toml index 8c0600eadc..52d646a367 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "hyper" -version = "0.12.27" +version = "0.12.28" authors = ["Sean McArthur "] include = ["Cargo.toml", "LICENSE", "src/**/*"] description = "A fast and correct HTTP library." diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/Cargo.toml.orig similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/Cargo.toml.orig index e58342ccba..09b25ed1f5 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "hyper" -version = "0.12.27" # don't forget to update html_root_url +version = "0.12.28" # don't forget to update html_root_url description = "A fast and correct HTTP library." readme = "README.md" homepage = "https://hyper.rs" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/LICENSE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/LICENSE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/LICENSE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/LICENSE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/body.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/body.rs similarity index 95% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/body.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/body.rs index 0f4a1d0220..6e5e7c39fe 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/body.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/body.rs @@ -3,7 +3,7 @@ use std::fmt; use bytes::Bytes; use futures::sync::{mpsc, oneshot}; -use futures::{Async, Future, Poll, Stream}; +use futures::{Async, Future, Poll, Stream, Sink, AsyncSink, StartSend}; use h2; use http::HeaderMap; @@ -381,6 +381,25 @@ impl Sender { } } +impl Sink for Sender { + type SinkItem = Chunk; + type SinkError = ::Error; + + fn poll_complete(&mut self) -> Poll<(), Self::SinkError> { + Ok(Async::Ready(())) + } + + fn start_send(&mut self, msg: Chunk) -> StartSend { + match self.poll_ready()? { + Async::Ready(_) => { + self.send_data(msg).map_err(|_| ::Error::new_closed())?; + Ok(AsyncSink::Ready) + } + Async::NotReady => Ok(AsyncSink::NotReady(msg)), + } + } +} + impl From for Body { #[inline] fn from(chunk: Chunk) -> Body { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/chunk.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/chunk.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/chunk.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/chunk.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/payload.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/payload.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/body/payload.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/body/payload.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/conn.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/conn.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/conn.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/conn.rs index 2195622c54..0d9f297d75 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/conn.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/conn.rs @@ -235,7 +235,7 @@ where }, Err(_req) => { debug!("connection was not ready"); - let err = ::Error::new_canceled(Some("connection was not ready")); + let err = ::Error::new_canceled().with("connection was not ready"); Either::B(future::err(err)) } }; @@ -262,7 +262,7 @@ where }, Err(req) => { debug!("connection was not ready"); - let err = ::Error::new_canceled(Some("connection was not ready")); + let err = ::Error::new_canceled().with("connection was not ready"); Either::B(future::err((err, Some(req)))) } } @@ -322,7 +322,7 @@ where }, Err(req) => { debug!("connection was not ready"); - let err = ::Error::new_canceled(Some("connection was not ready")); + let err = ::Error::new_canceled().with("connection was not ready"); Either::B(future::err((err, Some(req)))) } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/connect/dns.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/connect/dns.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/connect/dns.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/connect/dns.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/connect/http.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/connect/http.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/connect/http.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/connect/http.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/connect/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/connect/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/connect/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/connect/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/dispatch.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/dispatch.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/dispatch.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/dispatch.rs index 247d28eb04..1684804789 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/dispatch.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/dispatch.rs @@ -167,7 +167,7 @@ struct Envelope(Option<(T, Callback)>); impl Drop for Envelope { fn drop(&mut self) { if let Some((val, cb)) = self.0.take() { - let _ = cb.send(Err((::Error::new_canceled(None::<::Error>), Some(val)))); + let _ = cb.send(Err((::Error::new_canceled().with("connection closed"), Some(val)))); } } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/mod.rs index 7c89f65169..80e16b2ee6 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/mod.rs @@ -498,7 +498,7 @@ where C: Connect + Sync + 'static, let connecting = match pool.connecting(&pool_key, ver) { Some(lock) => lock, None => { - let canceled = ::Error::new_canceled(Some("HTTP/2 connection in progress")); + let canceled = ::Error::new_canceled().with("HTTP/2 connection in progress"); return Either::B(future::err(canceled)); } }; @@ -517,7 +517,7 @@ where C: Connect + Sync + 'static, None => { // Another connection has already upgraded, // the pool checkout should finish up for us. - let canceled = ::Error::new_canceled(Some("ALPN upgraded to HTTP/2")); + let canceled = ::Error::new_canceled().with("ALPN upgraded to HTTP/2"); return Either::B(future::err(canceled)); } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/pool.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/pool.rs similarity index 95% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/pool.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/pool.rs index 57e4bf35ec..bf7cefaa1e 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/pool.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/pool.rs @@ -198,41 +198,6 @@ impl Pool { .unwrap_or(0) } - fn take(&self, key: &Key) -> Option> { - let entry = { - let mut inner = self.inner.as_ref()?.lock().unwrap(); - let expiration = Expiration::new(inner.timeout); - let maybe_entry = inner.idle.get_mut(key) - .and_then(|list| { - trace!("take? {:?}: expiration = {:?}", key, expiration.0); - // A block to end the mutable borrow on list, - // so the map below can check is_empty() - { - let popper = IdlePopper { - key, - list, - }; - popper.pop(&expiration) - } - .map(|e| (e, list.is_empty())) - }); - - let (entry, empty) = if let Some((e, empty)) = maybe_entry { - (Some(e), empty) - } else { - // No entry found means nuke the list for sure. - (None, true) - }; - if empty { - //TODO: This could be done with the HashMap::entry API instead. - inner.idle.remove(key); - } - entry - }; - - entry.map(|e| self.reuse(key, e.value)) - } - pub(super) fn pooled(&self, mut connecting: Connecting, value: T) -> Pooled { let (value, pool_ref) = if let Some(ref enabled) = self.inner { match value.reserve() { @@ -296,23 +261,6 @@ impl Pool { value: Some(value), } } - - fn waiter(&self, key: Key, tx: oneshot::Sender) { - debug_assert!( - self.is_enabled(), - "pool.waiter() should not be called if disabled", - ); - trace!("checkout waiting for idle connection: {:?}", key); - self.inner - .as_ref() - .expect("pool.waiter() expects pool is enabled") - .lock() - .unwrap() - .waiters - .entry(key) - .or_insert(VecDeque::new()) - .push_back(tx); - } } /// Pop off this list, looking for a usable connection that hasn't expired. @@ -629,29 +577,68 @@ impl Checkout { if value.is_open() { Ok(Async::Ready(Some(self.pool.reuse(&self.key, value)))) } else { - Err(::Error::new_canceled(Some(CANCELED))) + Err(::Error::new_canceled().with(CANCELED)) } }, Ok(Async::NotReady) => { self.waiter = Some(rx); Ok(Async::NotReady) }, - Err(_canceled) => Err(::Error::new_canceled(Some(CANCELED))), + Err(_canceled) => Err(::Error::new_canceled().with(CANCELED)), } } else { Ok(Async::Ready(None)) } } - fn add_waiter(&mut self) { - debug_assert!(self.pool.is_enabled()); + fn checkout(&mut self) -> Option> { + let entry = { + let mut inner = self.pool.inner.as_ref()?.lock().unwrap(); + let expiration = Expiration::new(inner.timeout); + let maybe_entry = inner.idle.get_mut(&self.key) + .and_then(|list| { + trace!("take? {:?}: expiration = {:?}", self.key, expiration.0); + // A block to end the mutable borrow on list, + // so the map below can check is_empty() + { + let popper = IdlePopper { + key: &self.key, + list, + }; + popper.pop(&expiration) + } + .map(|e| (e, list.is_empty())) + }); - if self.waiter.is_none() { - let (tx, mut rx) = oneshot::channel(); - let _ = rx.poll(); // park this task - self.pool.waiter(self.key.clone(), tx); - self.waiter = Some(rx); - } + let (entry, empty) = if let Some((e, empty)) = maybe_entry { + (Some(e), empty) + } else { + // No entry found means nuke the list for sure. + (None, true) + }; + if empty { + //TODO: This could be done with the HashMap::entry API instead. + inner.idle.remove(&self.key); + } + + if entry.is_none() && self.waiter.is_none() { + let (tx, mut rx) = oneshot::channel(); + let _ = rx.poll(); // park this task + + trace!("checkout waiting for idle connection: {:?}", self.key); + inner + .waiters + .entry(self.key.clone()) + .or_insert(VecDeque::new()) + .push_back(tx); + + self.waiter = Some(rx); + } + + entry + }; + + entry.map(|e| self.pool.reuse(&self.key, e.value)) } } @@ -664,14 +651,11 @@ impl Future for Checkout { return Ok(Async::Ready(pooled)); } - let entry = self.pool.take(&self.key); - - if let Some(pooled) = entry { + if let Some(pooled) = self.checkout() { Ok(Async::Ready(pooled)) } else if !self.pool.is_enabled() { - Err(::Error::new_canceled(Some("pool is disabled"))) + Err(::Error::new_canceled().with("pool is disabled")) } else { - self.add_waiter(); Ok(Async::NotReady) } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/tests.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/tests.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/tests.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/tests.rs index a9deaac557..b55dc76d4a 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/client/tests.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/client/tests.rs @@ -103,10 +103,7 @@ fn conn_reset_after_write() { Ok(Async::Ready(())) }).map_err(|e: ::std::io::Error| panic!("srv2 poll_fn error: {}", e)); let err = rt.block_on(res2.join(srv2)).expect_err("res2"); - match err.kind() { - &::error::Kind::Incomplete => (), - other => panic!("expected Incomplete, found {:?}", other) - } + assert!(err.is_incomplete_message(), "{:?}", err); } #[test] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/buf.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/buf.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/buf.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/buf.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/drain.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/drain.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/drain.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/drain.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/exec.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/exec.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/exec.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/exec.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/io/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/io/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/io/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/io/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/io/rewind.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/io/rewind.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/io/rewind.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/io/rewind.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/lazy.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/lazy.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/lazy.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/lazy.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/never.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/never.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/common/never.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/common/never.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/error.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/error.rs similarity index 68% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/error.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/error.rs index 24d0d65712..2404c5821e 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/error.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/error.rs @@ -25,14 +25,15 @@ struct ErrorImpl { #[derive(Debug, PartialEq)] pub(crate) enum Kind { Parse(Parse), + User(User), /// A message reached EOF, but is not complete. - Incomplete, - /// A client connection received a response when not waiting for one. - MismatchedResponse, + IncompleteMessage, + /// A connection received a message (or bytes) when not waiting for one. + UnexpectedMessage, /// A pending item was dropped before ever being processed. Canceled, - /// Indicates a connection is closed. - Closed, + /// Indicates a channel (client or body sender) is closed. + ChannelClosed, /// An `io::Error` that occurred while trying to read or write to a network stream. Io, /// Error occurred while connecting. @@ -42,22 +43,40 @@ pub(crate) enum Kind { Listen, /// Error accepting on an Incoming stream. Accept, - /// Error calling user's NewService::new_service(). - NewService, - /// Error from future of user's Service::call(). - Service, /// Error while reading a body from connection. Body, /// Error while writing a body to connection. BodyWrite, - /// Error calling user's Payload::poll_data(). - BodyUser, /// Error calling AsyncWrite::shutdown() Shutdown, /// A general error from h2. Http2, +} +#[derive(Debug, PartialEq)] +pub(crate) enum Parse { + Method, + Version, + VersionH2, + Uri, + Header, + TooLarge, + Status, +} + +#[derive(Debug, PartialEq)] +pub(crate) enum User { + /// Error calling user's Payload::poll_data(). + Body, + /// Error calling user's MakeService. + MakeService, + /// Error from future of user's Service. + Service, + /// User tried to send a certain header in an unexpected context. + /// + /// For example, sending both `content-length` and `transfer-encoding`. + UnexpectedHeader, /// User tried to create a Request with bad version. UnsupportedVersion, /// User tried to create a CONNECT Request with the Client. @@ -77,26 +96,6 @@ pub(crate) enum Kind { Execute, } -#[derive(Debug, PartialEq)] -pub(crate) enum Parse { - Method, - Version, - VersionH2, - Uri, - Header, - TooLarge, - Status, -} - -/* -#[derive(Debug)] -pub(crate) enum User { - VersionNotSupported, - MethodNotSupported, - InvalidRequestUri, -} -*/ - impl Error { /// Returns true if this was an HTTP parse error. pub fn is_parse(&self) -> bool { @@ -109,16 +108,7 @@ impl Error { /// Returns true if this error was caused by user code. pub fn is_user(&self) -> bool { match self.inner.kind { - Kind::BodyUser | - Kind::NewService | - Kind::Service | - Kind::Closed | - Kind::UnsupportedVersion | - Kind::UnsupportedRequestMethod | - Kind::UnsupportedStatusCode | - Kind::AbsoluteUriRequired | - Kind::NoUpgrade | - Kind::Execute => true, + Kind::User(_) => true, _ => false, } } @@ -130,7 +120,7 @@ impl Error { /// Returns true if a sender's channel is closed. pub fn is_closed(&self) -> bool { - self.inner.kind == Kind::Closed + self.inner.kind == Kind::ChannelClosed } /// Returns true if this was an error from `Connect`. @@ -138,6 +128,11 @@ impl Error { self.inner.kind == Kind::Connect } + /// Returns true if the connection closed before a message could complete. + pub fn is_incomplete_message(&self) -> bool { + self.inner.kind == Kind::IncompleteMessage + } + #[doc(hidden)] #[cfg_attr(error_source, deprecated(note = "use Error::source instead"))] pub fn cause2(&self) -> Option<&(StdError + 'static + Sync + Send)> { @@ -149,15 +144,20 @@ impl Error { self.inner.cause } - pub(crate) fn new(kind: Kind, cause: Option) -> Error { + pub(crate) fn new(kind: Kind) -> Error { Error { inner: Box::new(ErrorImpl { kind, - cause, + cause: None, }), } } + pub(crate) fn with>(mut self, cause: C) -> Error { + self.inner.cause = Some(cause.into()); + self + } + pub(crate) fn kind(&self) -> &Kind { &self.inner.kind } @@ -201,114 +201,122 @@ impl Error { h2::Reason::INTERNAL_ERROR } - pub(crate) fn new_canceled>(cause: Option) -> Error { - Error::new(Kind::Canceled, cause.map(Into::into)) + pub(crate) fn new_canceled() -> Error { + Error::new(Kind::Canceled) } pub(crate) fn new_incomplete() -> Error { - Error::new(Kind::Incomplete, None) + Error::new(Kind::IncompleteMessage) } pub(crate) fn new_too_large() -> Error { - Error::new(Kind::Parse(Parse::TooLarge), None) - } - - pub(crate) fn new_header() -> Error { - Error::new(Kind::Parse(Parse::Header), None) + Error::new(Kind::Parse(Parse::TooLarge)) } pub(crate) fn new_version_h2() -> Error { - Error::new(Kind::Parse(Parse::VersionH2), None) + Error::new(Kind::Parse(Parse::VersionH2)) } - pub(crate) fn new_mismatched_response() -> Error { - Error::new(Kind::MismatchedResponse, None) + pub(crate) fn new_unexpected_message() -> Error { + Error::new(Kind::UnexpectedMessage) } pub(crate) fn new_io(cause: io::Error) -> Error { - Error::new(Kind::Io, Some(cause.into())) + Error::new(Kind::Io).with(cause) } #[cfg(feature = "runtime")] pub(crate) fn new_listen>(cause: E) -> Error { - Error::new(Kind::Listen, Some(cause.into())) + Error::new(Kind::Listen).with(cause) } pub(crate) fn new_accept>(cause: E) -> Error { - Error::new(Kind::Accept, Some(cause.into())) + Error::new(Kind::Accept).with(cause) } pub(crate) fn new_connect>(cause: E) -> Error { - Error::new(Kind::Connect, Some(cause.into())) + Error::new(Kind::Connect).with(cause) } pub(crate) fn new_closed() -> Error { - Error::new(Kind::Closed, None) + Error::new(Kind::ChannelClosed) } pub(crate) fn new_body>(cause: E) -> Error { - Error::new(Kind::Body, Some(cause.into())) + Error::new(Kind::Body).with(cause) } pub(crate) fn new_body_write>(cause: E) -> Error { - Error::new(Kind::BodyWrite, Some(cause.into())) + Error::new(Kind::BodyWrite).with(cause) + } + + fn new_user(user: User) -> Error { + Error::new(Kind::User(user)) + } + + pub(crate) fn new_user_header() -> Error { + Error::new_user(User::UnexpectedHeader) } pub(crate) fn new_user_unsupported_version() -> Error { - Error::new(Kind::UnsupportedVersion, None) + Error::new_user(User::UnsupportedVersion) } pub(crate) fn new_user_unsupported_request_method() -> Error { - Error::new(Kind::UnsupportedRequestMethod, None) + Error::new_user(User::UnsupportedRequestMethod) } pub(crate) fn new_user_unsupported_status_code() -> Error { - Error::new(Kind::UnsupportedStatusCode, None) + Error::new_user(User::UnsupportedStatusCode) } pub(crate) fn new_user_absolute_uri_required() -> Error { - Error::new(Kind::AbsoluteUriRequired, None) + Error::new_user(User::AbsoluteUriRequired) } pub(crate) fn new_user_no_upgrade() -> Error { - Error::new(Kind::NoUpgrade, None) + Error::new_user(User::NoUpgrade) } pub(crate) fn new_user_manual_upgrade() -> Error { - Error::new(Kind::ManualUpgrade, None) + Error::new_user(User::ManualUpgrade) } - pub(crate) fn new_user_new_service>(cause: E) -> Error { - Error::new(Kind::NewService, Some(cause.into())) + pub(crate) fn new_user_make_service>(cause: E) -> Error { + Error::new_user(User::MakeService).with(cause) } pub(crate) fn new_user_service>(cause: E) -> Error { - Error::new(Kind::Service, Some(cause.into())) + Error::new_user(User::Service).with(cause) } pub(crate) fn new_user_body>(cause: E) -> Error { - Error::new(Kind::BodyUser, Some(cause.into())) + Error::new_user(User::Body).with(cause) } pub(crate) fn new_shutdown(cause: io::Error) -> Error { - Error::new(Kind::Shutdown, Some(Box::new(cause))) + Error::new(Kind::Shutdown).with(cause) } pub(crate) fn new_execute>(cause: E) -> Error { - Error::new(Kind::Execute, Some(cause.into())) + Error::new_user(User::Execute).with(cause) } pub(crate) fn new_h2(cause: ::h2::Error) -> Error { - Error::new(Kind::Http2, Some(Box::new(cause))) + if cause.is_io() { + Error::new_io(cause.into_io().expect("h2::Error::is_io")) + } else { + Error::new(Kind::Http2).with(cause) + } } } impl fmt::Debug for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut f = f.debug_struct("Error"); - f.field("kind", &self.inner.kind); + let mut f = f.debug_tuple("Error"); + f.field(&self.inner.kind); if let Some(ref cause) = self.inner.cause { - f.field("cause", cause); + f.field(cause); } f.finish() } @@ -327,37 +335,38 @@ impl fmt::Display for Error { impl StdError for Error { fn description(&self) -> &str { match self.inner.kind { - Kind::Parse(Parse::Method) => "invalid Method specified", - Kind::Parse(Parse::Version) => "invalid HTTP version specified", - Kind::Parse(Parse::VersionH2) => "invalid HTTP version specified (Http2)", + Kind::Parse(Parse::Method) => "invalid HTTP method parsed", + Kind::Parse(Parse::Version) => "invalid HTTP version parsed", + Kind::Parse(Parse::VersionH2) => "invalid HTTP version parsed (found HTTP2 preface)", Kind::Parse(Parse::Uri) => "invalid URI", - Kind::Parse(Parse::Header) => "invalid Header provided", + Kind::Parse(Parse::Header) => "invalid HTTP header parsed", Kind::Parse(Parse::TooLarge) => "message head is too large", - Kind::Parse(Parse::Status) => "invalid Status provided", - Kind::Incomplete => "parsed HTTP message from remote is incomplete", - Kind::MismatchedResponse => "response received without matching request", - Kind::Closed => "connection closed", - Kind::Connect => "an error occurred trying to connect", - Kind::Canceled => "an operation was canceled internally before starting", + Kind::Parse(Parse::Status) => "invalid HTTP status-code parsed", + Kind::IncompleteMessage => "connection closed before message completed", + Kind::UnexpectedMessage => "received unexpected message from connection", + Kind::ChannelClosed => "channel closed", + Kind::Connect => "error trying to connect", + Kind::Canceled => "operation was canceled", #[cfg(feature = "runtime")] Kind::Listen => "error creating server listener", Kind::Accept => "error accepting connection", - Kind::NewService => "calling user's new_service failed", - Kind::Service => "error from user's server service", Kind::Body => "error reading a body from connection", Kind::BodyWrite => "error writing a body to connection", - Kind::BodyUser => "error from user's Payload stream", Kind::Shutdown => "error shutting down connection", - Kind::Http2 => "http2 general error", - Kind::UnsupportedVersion => "request has unsupported HTTP version", - Kind::UnsupportedRequestMethod => "request has unsupported HTTP method", - Kind::UnsupportedStatusCode => "response has 1xx status code, not supported by server", - Kind::AbsoluteUriRequired => "client requires absolute-form URIs", - Kind::NoUpgrade => "no upgrade available", - Kind::ManualUpgrade => "upgrade expected but low level API in use", - Kind::Execute => "executor failed to spawn task", - - Kind::Io => "an IO error occurred", + Kind::Http2 => "http2 error", + Kind::Io => "connection error", + + Kind::User(User::Body) => "error from user's Payload stream", + Kind::User(User::MakeService) => "error from user's MakeService", + Kind::User(User::Service) => "error from user's Service", + Kind::User(User::UnexpectedHeader) => "user sent unexpected header", + Kind::User(User::UnsupportedVersion) => "request has unsupported HTTP version", + Kind::User(User::UnsupportedRequestMethod) => "request has unsupported HTTP method", + Kind::User(User::UnsupportedStatusCode) => "response has 1xx status code, not supported by server", + Kind::User(User::AbsoluteUriRequired) => "client requires absolute-form URIs", + Kind::User(User::NoUpgrade) => "no upgrade available", + Kind::User(User::ManualUpgrade) => "upgrade expected but low level API in use", + Kind::User(User::Execute) => "executor failed to spawn task", } } @@ -383,7 +392,7 @@ impl StdError for Error { #[doc(hidden)] impl From for Error { fn from(err: Parse) -> Error { - Error::new(Kind::Parse(err), None) + Error::new(Kind::Parse(err)) } } @@ -438,8 +447,14 @@ impl AssertSendSync for Error {} #[cfg(test)] mod tests { + use std::mem; use super::*; + #[test] + fn error_size_of() { + assert_eq!(mem::size_of::(), mem::size_of::()); + } + #[test] fn h2_reason_unknown() { let closed = Error::new_closed(); diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/headers.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/headers.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/headers.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/headers.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/lib.rs similarity index 96% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/lib.rs index 53fd53a65f..d15fbaa163 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/lib.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/lib.rs @@ -1,4 +1,4 @@ -#![doc(html_root_url = "https://docs.rs/hyper/0.12.27")] +#![doc(html_root_url = "https://docs.rs/hyper/0.12.28")] #![deny(missing_docs)] #![deny(missing_debug_implementations)] #![cfg_attr(test, deny(warnings))] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/mock.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/mock.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/mock.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/mock.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/conn.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/conn.rs similarity index 93% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/conn.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/conn.rs index a13c48a288..721ed9d0a1 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/conn.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/conn.rs @@ -98,7 +98,6 @@ where I: AsyncRead + AsyncWrite, pub fn can_read_head(&self) -> bool { match self.state.reading { - //Reading::Init => true, Reading::Init => { if T::should_read_first() { true @@ -228,13 +227,19 @@ where I: AsyncRead + AsyncWrite, ret } - pub fn read_keep_alive(&mut self) -> Result<(), ::Error> { + pub fn wants_read_again(&mut self) -> bool { + let ret = self.state.notify_read; + self.state.notify_read = false; + ret + } + + pub fn read_keep_alive(&mut self) -> Poll<(), ::Error> { debug_assert!(!self.can_read_head() && !self.can_read_body()); if self.is_mid_message() { - self.mid_message_detect_eof().map_err(::Error::new_io) + self.mid_message_detect_eof() } else { - self.require_empty_read().map_err(::Error::new_io) + self.require_empty_read() } } @@ -245,89 +250,67 @@ where I: AsyncRead + AsyncWrite, } } - pub fn wants_read_again(&mut self) -> bool { - let ret = self.state.notify_read; - self.state.notify_read = false; - ret - } - // This will check to make sure the io object read is empty. // // This should only be called for Clients wanting to enter the idle // state. - fn require_empty_read(&mut self) -> io::Result<()> { + fn require_empty_read(&mut self) -> Poll<(), ::Error> { debug_assert!(!self.can_read_head() && !self.can_read_body()); + debug_assert!(!self.is_mid_message()); + debug_assert!(T::is_client()); if !self.io.read_buf().is_empty() { debug!("received an unexpected {} bytes", self.io.read_buf().len()); - Err(io::Error::new(io::ErrorKind::InvalidData, "unexpected bytes after message ended")) - } else { - match self.try_io_read()? { - Async::Ready(0) => { - // case handled in try_io_read - Ok(()) - }, - Async::Ready(n) => { - debug!("received {} bytes on an idle connection", n); - let desc = if self.state.is_idle() { - "unexpected bytes after message ended" - } else { - "unexpected bytes before writing message" - }; - Err(io::Error::new(io::ErrorKind::InvalidData, desc)) - }, - Async::NotReady => { - trace!("read_keep_alive check: ok, nothing to read yet"); - Ok(()) - }, - } + return Err(::Error::new_unexpected_message()); + } + + let num_read = try_ready!(self.force_io_read().map_err(::Error::new_io)); + + if num_read == 0 { + let ret = if self.should_error_on_eof() { + trace!("found unexpected EOF on busy connection: {:?}", self.state); + Err(::Error::new_incomplete()) + } else { + trace!("found EOF on idle connection, closing"); + Ok(Async::Ready(())) + }; + + // order is important: should_error needs state BEFORE close_read + self.state.close_read(); + return ret; } + + debug!("received unexpected {} bytes on an idle connection", num_read); + Err(::Error::new_unexpected_message()) } - fn mid_message_detect_eof(&mut self) -> io::Result<()> { + fn mid_message_detect_eof(&mut self) -> Poll<(), ::Error> { debug_assert!(!self.can_read_head() && !self.can_read_body()); + debug_assert!(self.is_mid_message()); if self.state.allow_half_close || !self.io.read_buf().is_empty() { - Ok(()) - } else { - self.try_io_read().map(|_| ()) + return Ok(Async::NotReady); } - } - fn try_io_read(&mut self) -> Poll { - match self.io.read_from_io() { - Ok(Async::Ready(0)) => { - trace!("try_io_read; found EOF on connection: {:?}", self.state); - let must_error = !self.state.is_idle(); - let ret = if must_error { - let desc = if self.is_mid_message() { - "unexpected EOF waiting for response" - } else { - "unexpected EOF before writing message" - }; - Err(io::Error::new(io::ErrorKind::UnexpectedEof, desc)) - } else { - Ok(Async::Ready(0)) - }; + let num_read = try_ready!(self.force_io_read().map_err(::Error::new_io)); - // order is important: must_error needs state BEFORE close_read - self.state.close_read(); - ret - }, - Ok(Async::Ready(n)) => { - Ok(Async::Ready(n)) - }, - Ok(Async::NotReady) => { - Ok(Async::NotReady) - }, - Err(e) => { - trace!("try_io_read; error = {}", e); - self.state.close(); - Err(e) - } + if num_read == 0 { + trace!("found unexpected EOF on busy connection: {:?}", self.state); + self.state.close_read(); + Err(::Error::new_incomplete()) + } else { + Ok(Async::Ready(())) } } + fn force_io_read(&mut self) -> Poll { + self.io.read_from_io().map_err(|e| { + trace!("force_io_read; io error = {:?}", e); + self.state.close(); + e + }) + } + fn maybe_notify(&mut self) { // its possible that we returned NotReady from poll() without having diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/date.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/date.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/date.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/date.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/decode.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/decode.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/decode.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/decode.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/dispatch.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/dispatch.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/dispatch.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/dispatch.rs index 2857b90548..df4d013769 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/dispatch.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/dispatch.rs @@ -162,7 +162,6 @@ where self.conn.close_read(); } } - } }, Ok(Async::Ready(None)) => { @@ -180,7 +179,7 @@ where // just drop, the body will close automatically } } else { - return self.conn.read_keep_alive().map(Async::Ready); + return self.conn.read_keep_alive(); } } } @@ -486,7 +485,10 @@ where let _ = cb.send(Ok(res)); Ok(()) } else { - Err(::Error::new_mismatched_response()) + // Getting here is likely a bug! An error should have happened + // in Conn::require_empty_read() before ever parsing a + // full message! + Err(::Error::new_unexpected_message()) } }, Err(err) => { @@ -497,7 +499,7 @@ where trace!("canceling queued request with connection error: {}", err); // in this case, the message was never even started, so it's safe to tell // the user that the request was completely canceled - let _ = cb.send(Err((::Error::new_canceled(Some(err)), Some(req)))); + let _ = cb.send(Err((::Error::new_canceled().with(err), Some(req)))); Ok(()) } else { Err(err) diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/encode.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/encode.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/encode.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/encode.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/io.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/io.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/io.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/io.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/mod.rs similarity index 85% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/mod.rs index 5facd13534..5ecbb6350a 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/mod.rs @@ -31,8 +31,21 @@ pub(crate) trait Http1Transaction { fn on_error(err: &::Error) -> Option>; - fn should_error_on_parse_eof() -> bool; - fn should_read_first() -> bool; + fn is_client() -> bool { + !Self::is_server() + } + + fn is_server() -> bool { + !Self::is_client() + } + + fn should_error_on_parse_eof() -> bool { + Self::is_client() + } + + fn should_read_first() -> bool { + Self::is_server() + } fn update_date() {} } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/role.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/role.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/role.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/role.rs index db8ff54cc3..6569384884 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h1/role.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h1/role.rs @@ -65,7 +65,7 @@ impl Http1Transaction for Server { const LOG: &'static str = "{role=server}"; fn parse(buf: &mut BytesMut, ctx: ParseContext) -> ParseResult { - if buf.len() == 0 { + if buf.is_empty() { return Ok(None); } @@ -294,7 +294,7 @@ impl Http1Transaction for Server { if wrote_len { warn!("unexpected content-length found, canceling"); rewind(dst); - return Err(::Error::new_header()); + return Err(::Error::new_user_header()); } match msg.body { Some(BodyLength::Known(known_len)) => { @@ -354,7 +354,7 @@ impl Http1Transaction for Server { if fold.0 != len { warn!("multiple Content-Length values found: [{}, {}]", fold.0, len); rewind(dst); - return Err(::Error::new_header()); + return Err(::Error::new_user_header()); } folded = Some(fold); } else { @@ -363,7 +363,7 @@ impl Http1Transaction for Server { } else { warn!("illegal Content-Length value: {:?}", value); rewind(dst); - return Err(::Error::new_header()); + return Err(::Error::new_user_header()); } } if let Some((len, value)) = folded { @@ -403,7 +403,7 @@ impl Http1Transaction for Server { if wrote_len { warn!("unexpected transfer-encoding found, canceling"); rewind(dst); - return Err(::Error::new_header()); + return Err(::Error::new_user_header()); } // check that we actually can send a chunked body... if msg.head.version == Version::HTTP_10 || !Server::can_chunked(msg.req_method, msg.head.subject) { @@ -531,11 +531,7 @@ impl Http1Transaction for Server { Some(msg) } - fn should_error_on_parse_eof() -> bool { - false - } - - fn should_read_first() -> bool { + fn is_server() -> bool { true } @@ -575,7 +571,7 @@ impl Http1Transaction for Client { fn parse(buf: &mut BytesMut, ctx: ParseContext) -> ParseResult { // Loop to skip information status code headers (100 Continue, etc). loop { - if buf.len() == 0 { + if buf.is_empty() { return Ok(None); } // Unsafe: see comment in Server Http1Transaction, above. @@ -615,9 +611,8 @@ impl Http1Transaction for Client { let name = header_name!(&slice[header.name.0..header.name.1]); let value = header_value!(slice.slice(header.value.0, header.value.1)); - match name { - header::CONNECTION => { - // keep_alive was previously set to default for Version + if let header::CONNECTION = name { + // keep_alive was previously set to default for Version if keep_alive { // HTTP/1.1 keep_alive = !headers::connection_close(&value); @@ -626,9 +621,7 @@ impl Http1Transaction for Client { // HTTP/1.0 keep_alive = headers::connection_keep_alive(&value); } - }, - _ => (), - } + } headers.append(name, value); } @@ -695,13 +688,9 @@ impl Http1Transaction for Client { None } - fn should_error_on_parse_eof() -> bool { + fn is_client() -> bool { true } - - fn should_read_first() -> bool { - false - } } impl Client { @@ -734,12 +723,9 @@ impl Client { Some(Method::HEAD) => { return Ok(Some((DecodedLength::ZERO, false))); } - Some(Method::CONNECT) => match inc.subject.as_u16() { - 200...299 => { - return Ok(Some((DecodedLength::ZERO, true))); - }, - _ => {}, - }, + Some(Method::CONNECT) => if let 200...299 = inc.subject.as_u16() { + return Ok(Some((DecodedLength::ZERO, true))); + } Some(_) => {}, None => { trace!("Client::decoder is missing the Method"); diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h2/client.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h2/client.rs similarity index 77% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h2/client.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h2/client.rs index 276e9120bd..bb5cdcb666 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h2/client.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h2/client.rs @@ -1,7 +1,7 @@ use bytes::IntoBuf; use futures::{Async, Future, Poll, Stream}; use futures::future::{self, Either}; -use futures::sync::mpsc; +use futures::sync::{mpsc, oneshot}; use h2::client::{Builder, Handshake, SendRequest}; use tokio_io::{AsyncRead, AsyncWrite}; @@ -18,6 +18,10 @@ type ClientRx = ::client::dispatch::Receiver, Response>; /// other handles to it have been dropped, so that it can shutdown. type ConnDropRef = mpsc::Sender; +/// A oneshot channel watches the `Connection` task, and when it completes, +/// the "dispatch" task will be notified and can shutdown sooner. +type ConnEof = oneshot::Receiver; + pub(crate) struct Client where B: Payload, @@ -29,7 +33,7 @@ where enum State where B: IntoBuf { Handshaking(Handshake), - Ready(SendRequest, ConnDropRef), + Ready(SendRequest, ConnDropRef, ConnEof), } impl Client @@ -66,6 +70,7 @@ where // in h2 where dropping all SendRequests won't notify a // parked Connection. let (tx, rx) = mpsc::channel(0); + let (cancel_tx, cancel_rx) = oneshot::channel(); let rx = rx.into_future() .map(|(msg, _)| match msg { Some(never) => match never {}, @@ -73,7 +78,10 @@ where }) .map_err(|_| -> Never { unreachable!("mpsc cannot error") }); let fut = conn - .inspect(|_| trace!("connection complete")) + .inspect(move |_| { + drop(cancel_tx); + trace!("connection complete") + }) .map_err(|e| debug!("connection error: {}", e)) .select2(rx) .then(|res| match res { @@ -92,15 +100,26 @@ where Err(Either::B((never, _))) => match never {}, }); self.executor.execute(fut)?; - State::Ready(request_tx, tx) + State::Ready(request_tx, tx, cancel_rx) }, - State::Ready(ref mut tx, ref conn_dropper) => { - try_ready!(tx.poll_ready().map_err(::Error::new_h2)); + State::Ready(ref mut tx, ref conn_dropper, ref mut cancel_rx) => { + match tx.poll_ready() { + Ok(Async::Ready(())) => (), + Ok(Async::NotReady) => return Ok(Async::NotReady), + Err(err) => { + return if err.reason() == Some(::h2::Reason::NO_ERROR) { + trace!("connection gracefully shutdown"); + Ok(Async::Ready(Dispatched::Shutdown)) + } else { + Err(::Error::new_h2(err)) + }; + } + } match self.rx.poll() { - Ok(Async::Ready(Some((req, mut cb)))) => { + Ok(Async::Ready(Some((req, cb)))) => { // check that future hasn't been canceled already if cb.is_canceled() { - trace!("request canceled"); + trace!("request callback is canceled"); continue; } let (head, body) = req.into_parts(); @@ -157,13 +176,22 @@ where continue; }, - Ok(Async::NotReady) => return Ok(Async::NotReady), + Ok(Async::NotReady) => { + match cancel_rx.poll() { + Ok(Async::Ready(never)) => match never {}, + Ok(Async::NotReady) => return Ok(Async::NotReady), + Err(_conn_is_eof) => { + trace!("connection task is closed, closing dispatch task"); + return Ok(Async::Ready(Dispatched::Shutdown)); + } + } + }, - Ok(Async::Ready(None)) | - Err(_) => { + Ok(Async::Ready(None)) => { trace!("client::dispatch::Sender dropped"); return Ok(Async::Ready(Dispatched::Shutdown)); - } + }, + Err(never) => match never {}, } }, }; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h2/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h2/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h2/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h2/mod.rs index ff702561e6..3fe88389cb 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h2/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h2/mod.rs @@ -126,7 +126,7 @@ where match try_ready!(self.body_tx.poll_capacity().map_err(::Error::new_body_write)) { Some(0) => {} Some(_) => break, - None => return Err(::Error::new_canceled(None::<::Error>)), + None => return Err(::Error::new_canceled()), } } } else { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h2/server.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h2/server.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/h2/server.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/h2/server.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/proto/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/proto/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/rt.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/rt.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/rt.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/rt.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/conn.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/conn.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/conn.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/conn.rs index 333a9689d0..5132ac8a44 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/conn.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/conn.rs @@ -708,7 +708,7 @@ where Ok(Async::NotReady) => return Ok(Async::NotReady), Err(e) => { trace!("make_service closed"); - return Err(::Error::new_user_new_service(e)); + return Err(::Error::new_user_make_service(e)); } } @@ -876,8 +876,8 @@ pub(crate) mod spawn_all { let conn = try_ready!(connecting .poll() .map_err(|err| { - let err = ::Error::new_user_new_service(err); - debug!("connection error: {}", err); + let err = ::Error::new_user_make_service(err); + debug!("connecting error: {}", err); })); let connected = watcher.watch(conn.with_upgrades()); State::Connected(connected) diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/shutdown.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/shutdown.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/shutdown.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/shutdown.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/tcp.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/tcp.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/server/tcp.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/server/tcp.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/service/make_service.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/service/make_service.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/service/make_service.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/service/make_service.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/service/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/service/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/service/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/service/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/service/new_service.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/service/new_service.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/service/new_service.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/service/new_service.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/service/service.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/service/service.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/service/service.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/service/service.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/upgrade.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/upgrade.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/upgrade.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/upgrade.rs index 4cac855728..d649d251ff 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.27/src/upgrade.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.28/src/upgrade.rs @@ -209,7 +209,7 @@ impl Future for OnUpgrade { Ok(Async::Ready(Ok(upgraded))) => Ok(Async::Ready(upgraded)), Ok(Async::Ready(Err(err))) => Err(err), Err(_oneshot_canceled) => Err( - ::Error::new_canceled(Some(UpgradeExpected(()))) + ::Error::new_canceled().with(UpgradeExpected(())) ), }, None => Err(::Error::new_user_no_upgrade()), diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.cargo_vcs_info.json deleted file mode 100644 index 672815373b..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.cargo_vcs_info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "git": { - "sha1": "caec2745c6f2755a9e698ff73c2c4e7bfcdc2111" - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.travis.yml deleted file mode 100644 index 0a076ce40b..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -sudo: false -language: rust - -matrix: - include: - - rust: stable - - FEATURES="i128" - - rust: beta - - FEATURES="i128" - - rust: nightly - env: - - FEATURES="i128" - - BUILD_BENCH="true" - - rust: 1.0.0 - script: cargo build - - rust: 1.20.0 - script: cargo test - -script: - - cargo build --verbose --features "$FEATURES" - - cargo test --verbose --features "$FEATURES" - - cargo build --verbose --no-default-features --features "$FEATURES" - - cargo test --verbose --no-default-features --features "$FEATURES" - - if [ "$BUILD_BENCH" == "true" ]; then cargo bench --verbose --no-run --features "$FEATURES"; fi - diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/README.md deleted file mode 100644 index 759be9d204..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/README.md +++ /dev/null @@ -1,82 +0,0 @@ -itoa -==== - -[![Build Status](https://api.travis-ci.org/dtolnay/itoa.svg?branch=master)](https://travis-ci.org/dtolnay/itoa) -[![Latest Version](https://img.shields.io/crates/v/itoa.svg)](https://crates.io/crates/itoa) - -This crate provides fast functions for printing integer primitives to an -[`io::Write`](https://doc.rust-lang.org/std/io/trait.Write.html) or a -[`fmt::Write`](https://doc.rust-lang.org/core/fmt/trait.Write.html). The -implementation comes straight from -[libcore](https://github.com/rust-lang/rust/blob/b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89/src/libcore/fmt/num.rs#L201-L254) -but avoids the performance penalty of going through -[`fmt::Formatter`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html). - -See also [`dtoa`](https://github.com/dtolnay/dtoa) for printing floating point -primitives. - -## Performance (lower is better) - -![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png) - -## Functions - -```rust -extern crate itoa; - -// write to a vector or other io::Write -let mut buf = Vec::new(); -itoa::write(&mut buf, 128u64)?; -println!("{:?}", buf); - -// write to a stack buffer -let mut bytes = [b'\0'; 20]; -let n = itoa::write(&mut bytes[..], 128u64)?; -println!("{:?}", &bytes[..n]); - -// write to a String -let mut s = String::new(); -itoa::fmt(&mut s, 128u64)?; -println!("{}", s); -``` - -The function signatures are: - -```rust -fn write(writer: W, value: V) -> io::Result; - -fn fmt(writer: W, value: V) -> fmt::Result; -``` - -where `itoa::Integer` is implemented for `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, -`i64`, `u64`, `i128`, `u128`, `isize` and `usize`. 128-bit integer support is -only available with the nightly compiler when the `i128` feature is enabled for -this crate. The return value gives the number of bytes written. - -The `write` function is only available when the `std` feature is enabled -(default is enabled). - -## Dependency - -Itoa is available on [crates.io](https://crates.io/crates/itoa). Use the -following in `Cargo.toml`: - -```toml -[dependencies] -itoa = "0.4" -``` - -## License - -Licensed under either of - - * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) - * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) - -at your option. - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in itoa by you, as defined in the Apache-2.0 license, shall be -dual licensed as above, without any additional terms or conditions. diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.cargo_vcs_info.json new file mode 100644 index 0000000000..4598c4b83c --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "7ef10b214de344f162ac7a64579d646767dd2dea" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.gitignore b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.gitignore similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/.gitignore rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.gitignore diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.travis.yml new file mode 100644 index 0000000000..3a0278ef76 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/.travis.yml @@ -0,0 +1,26 @@ +sudo: false +language: rust + +matrix: + include: + - rust: stable + env: + - FEATURES="i128" + - rust: beta + env: + - FEATURES="i128" + - rust: nightly + env: + - FEATURES="i128" + - BUILD_BENCH="true" + - rust: 1.0.0 + script: cargo build + - rust: 1.20.0 + script: cargo test + +script: + - cargo build --features "$FEATURES" + - cargo test --features "$FEATURES" + - cargo build --no-default-features --features "$FEATURES" + - cargo test --tests --no-default-features --features "$FEATURES" + - if [ "$BUILD_BENCH" == "true" ]; then cargo bench --no-run --features "$FEATURES"; fi diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/Cargo.toml similarity index 93% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/Cargo.toml index dd56fee2c6..0563bc1af4 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "itoa" -version = "0.4.3" +version = "0.4.4" authors = ["David Tolnay "] exclude = ["performance.png"] description = "Fast functions for printing integer primitives to an io::Write" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/Cargo.toml.orig similarity index 89% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/Cargo.toml.orig index 86ec194962..244a12791c 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "itoa" -version = "0.4.3" # remember to update html_root_url +version = "0.4.4" # remember to update html_root_url authors = ["David Tolnay "] license = "MIT/Apache-2.0" description = "Fast functions for printing integer primitives to an io::Write" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/LICENSE-APACHE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/LICENSE-APACHE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/LICENSE-APACHE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/LICENSE-MIT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/LICENSE-MIT similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/LICENSE-MIT rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/LICENSE-MIT diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/README.md new file mode 100644 index 0000000000..d36f4fd51c --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/README.md @@ -0,0 +1,95 @@ +itoa +==== + +[![Build Status](https://api.travis-ci.org/dtolnay/itoa.svg?branch=master)](https://travis-ci.org/dtolnay/itoa) +[![Latest Version](https://img.shields.io/crates/v/itoa.svg)](https://crates.io/crates/itoa) +[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/itoa) + +This crate provides fast functions for printing integer primitives to an +[`io::Write`] or a [`fmt::Write`]. The implementation comes straight from +[libcore] but avoids the performance penalty of going through +[`fmt::Formatter`]. + +See also [`dtoa`] for printing floating point primitives. + +*Version requirement: rustc 1.0+* + +[`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html +[`fmt::Write`]: https://doc.rust-lang.org/core/fmt/trait.Write.html +[libcore]: https://github.com/rust-lang/rust/blob/b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89/src/libcore/fmt/num.rs#L201-L254 +[`fmt::Formatter`]: https://doc.rust-lang.org/std/fmt/struct.Formatter.html +[`dtoa`]: https://github.com/dtolnay/dtoa + +```toml +[dependencies] +itoa = "0.4" +``` + +
+ +## Performance (lower is better) + +![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png) + +
+ +## Examples + +```rust +use std::{fmt, io}; + +fn demo_itoa_write() -> io::Result<()> { + // Write to a vector or other io::Write. + let mut buf = Vec::new(); + itoa::write(&mut buf, 128u64)?; + println!("{:?}", buf); + + // Write to a stack buffer. + let mut bytes = [0u8; 20]; + let n = itoa::write(&mut bytes[..], 128u64)?; + println!("{:?}", &bytes[..n]); + + Ok(()) +} + +fn demo_itoa_fmt() -> fmt::Result { + // Write to a string. + let mut s = String::new(); + itoa::fmt(&mut s, 128u64)?; + println!("{}", s); + + Ok(()) +} +``` + +The function signatures are: + +```rust +fn write(writer: W, value: V) -> io::Result; + +fn fmt(writer: W, value: V) -> fmt::Result; +``` + +where `itoa::Integer` is implemented for i8, u8, i16, u16, i32, u32, i64, u64, +i128, u128, isize and usize. 128-bit integer support requires rustc 1.26+ and +the `i128` feature of this crate enabled. + +The `write` function is only available when the `std` feature is enabled +(default is enabled). The return value gives the number of bytes written. + +
+ +#### License + + +Licensed under either of Apache License, Version +2.0 or MIT license at your option. + + +
+ + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in this crate by you, as defined in the Apache-2.0 license, shall +be dual licensed as above, without any additional terms or conditions. + diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/benches/bench.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/benches/bench.rs similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/benches/bench.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/benches/bench.rs index 8f5f25d637..c3b55000b9 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/benches/bench.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/benches/bench.rs @@ -1,4 +1,3 @@ -#![cfg_attr(feature = "i128", feature(i128_type, i128))] #![cfg_attr(feature = "cargo-clippy", allow(cast_lossless))] #![feature(test)] #![allow(non_snake_case)] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/src/lib.rs similarity index 83% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/src/lib.rs index 3122f7c5a0..323bb6e2fe 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/src/lib.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/src/lib.rs @@ -1,16 +1,59 @@ -// Copyright 2016 Itoa Developers -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![doc(html_root_url = "https://docs.rs/itoa/0.4.3")] +//! This crate provides fast functions for printing integer primitives to an +//! [`io::Write`] or a [`fmt::Write`]. The implementation comes straight from +//! [libcore] but avoids the performance penalty of going through +//! [`fmt::Formatter`]. +//! +//! See also [`dtoa`] for printing floating point primitives. +//! +//! [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html +//! [`fmt::Write`]: https://doc.rust-lang.org/core/fmt/trait.Write.html +//! [libcore]: https://github.com/rust-lang/rust/blob/b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89/src/libcore/fmt/num.rs#L201-L254 +//! [`fmt::Formatter`]: https://doc.rust-lang.org/std/fmt/struct.Formatter.html +//! [`dtoa`]: https://github.com/dtolnay/dtoa +//! +//!
+//! +//! # Performance (lower is better) +//! +//! ![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png) +//! +//!
+//! +//! # Examples +//! +//! ```edition2018 +//! use std::{fmt, io}; +//! +//! fn demo_itoa_write() -> io::Result<()> { +//! // Write to a vector or other io::Write. +//! let mut buf = Vec::new(); +//! itoa::write(&mut buf, 128u64)?; +//! println!("{:?}", buf); +//! +//! // Write to a stack buffer. +//! let mut bytes = [0u8; 20]; +//! let n = itoa::write(&mut bytes[..], 128u64)?; +//! println!("{:?}", &bytes[..n]); +//! +//! Ok(()) +//! } +//! +//! fn demo_itoa_fmt() -> fmt::Result { +//! // Write to a string. +//! let mut s = String::new(); +//! itoa::fmt(&mut s, 128u64)?; +//! println!("{}", s); +//! +//! Ok(()) +//! } +//! ``` + +#![doc(html_root_url = "https://docs.rs/itoa/0.4.4")] #![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))] #![cfg_attr( feature = "cargo-clippy", - allow(cast_lossless, unreadable_literal) + allow(const_static_lifetime, transmute_ptr_to_ptr), )] #[cfg(feature = "i128")] @@ -43,7 +86,7 @@ pub fn fmt(mut wr: W, value: V) -> fmt::Result { /// /// # Example /// -/// ```rust +/// ``` /// let mut buffer = itoa::Buffer::new(); /// let printed = buffer.format(1234); /// assert_eq!(printed, "1234"); @@ -95,7 +138,7 @@ mod private { pub trait Integer: private::Sealed { // Not public API. #[doc(hidden)] - fn write<'a>(self, buf: &'a mut Buffer) -> &'a str; + fn write(self, buf: &mut Buffer) -> &str; } trait IntegerPrivate { @@ -115,7 +158,7 @@ macro_rules! impl_IntegerCommon { ($max_len:expr, $t:ident) => { impl Integer for $t { #[inline] - fn write<'a>(self, buf: &'a mut Buffer) -> &'a str { + fn write(self, buf: &mut Buffer) -> &str { unsafe { debug_assert!($max_len <= I128_MAX_LEN); let buf = mem::transmute::<&mut [u8; I128_MAX_LEN], &mut [u8; $max_len]>( diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/src/udiv128.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/src/udiv128.rs similarity index 58% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/src/udiv128.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/src/udiv128.rs index 70fffc6baf..adbdce2272 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/src/udiv128.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/src/udiv128.rs @@ -1,25 +1,23 @@ -// Copyright 2009-2016 compiler-builtins Developers -// -// The compiler-builtins crate is dual licensed under both the University of -// Illinois "BSD-Like" license and the MIT license. As a user of this code you may -// choose to use it under either license. As a contributor, you agree to allow -// your code to be used under both. +// The code in this file is based on Rust's compiler-builtins crate. The Rust +// compiler automatically links programs against this crate for target-specific +// runtime support. We have copied the implementation of `__udivmodti4()` which +// is an intrinsic implementing division with remainder for architectures +// without 128-bit integers. This implementation works around some poor codegen +// by LLVM (https://github.com/rust-lang/rust/issues/44545) and allows for +// inlining which does not happen with the intrinsic. // -// Full text of the relevant licenses is found here: +// The compiler-builtins crate carries the following license, which is available +// in full at: // https://github.com/rust-lang-nursery/compiler-builtins/blob/master/LICENSE.TXT // +// --- // +// Copyright 2009-2016 compiler-builtins Developers // -// The following code is based on Rust’s [compiler-builtins crate] -// (https://github.com/rust-lang-nursery/compiler-builtins) which -// provides runtime functions for the Rust programs. The Rust -// compiler will automatically link your programs against this crate. -// -// We copied the implementation of '__udivmodti4()' which is an intrinsic -// implementing division with remainder for architectures without 128-bit integer support. -// We have done this two reasons, to work around [bad optimization by LLVM] -// (https://github.com/rust-lang/rust/issues/44545) and to allow function -// inlining which doesn’t happen with the intrinsic. +// The compiler-builtins crate is dual licensed under both the University of +// Illinois "BSD-Like" license and the MIT license. As a user of this code you +// may choose to use it under either license. As a contributor, you agree to +// allow your code to be used under both. #[inline] pub fn udivmod_1e19(n: u128) -> (u128, u64) { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/tests/test.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/tests/test.rs similarity index 96% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/tests/test.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/tests/test.rs index 8047f3312b..dd8d4948a4 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.3/tests/test.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.4/tests/test.rs @@ -1,4 +1,3 @@ -#![cfg_attr(feature = "i128", feature(i128_type, i128))] #![cfg_attr( feature = "cargo-clippy", allow(cast_lossless, string_lit_as_bytes) diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.cargo_vcs_info.json deleted file mode 100644 index f4d5922be3..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.cargo_vcs_info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "git": { - "sha1": "173c5be79bc931c6b0d3227aa2133ff34f8a1761" - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.cargo_vcs_info.json new file mode 100644 index 0000000000..8f42b6d383 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "39ca01c8b3631db48c8e390f93f62e52b51a68b9" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.cirrus.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.cirrus.yml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.cirrus.yml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.cirrus.yml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.github/issue_template.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.github/issue_template.md new file mode 100644 index 0000000000..435bf35c66 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.github/issue_template.md @@ -0,0 +1,24 @@ + diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.gitignore b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.gitignore similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/.gitignore rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/.gitignore diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/CONTRIBUTING.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/CONTRIBUTING.md similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/CONTRIBUTING.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/CONTRIBUTING.md diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/Cargo.toml similarity index 95% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/Cargo.toml index 136b0ff6a6..c8a6f0f19b 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "libc" -version = "0.2.51" +version = "0.2.54" authors = ["The Rust Project Developers"] build = "build.rs" exclude = ["/ci/*", "/.travis.yml", "/appveyor.yml"] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/Cargo.toml.orig similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/Cargo.toml.orig index 4e822d4f8c..e8492974e0 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "libc" -version = "0.2.51" +version = "0.2.54" authors = ["The Rust Project Developers"] license = "MIT OR Apache-2.0" readme = "README.md" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/LICENSE-APACHE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/LICENSE-APACHE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/LICENSE-APACHE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/LICENSE-MIT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/LICENSE-MIT similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/LICENSE-MIT rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/LICENSE-MIT diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/README.md similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/README.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/README.md diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/build.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/build.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/build.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/build.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/rustfmt.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/rustfmt.toml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/rustfmt.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/rustfmt.toml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/arm.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/arm.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/arm.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/arm.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/x86.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/x86.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/x86.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/x86.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/cloudabi/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/cloudabi/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/mod.rs index 01317e30a4..cef48e5224 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/mod.rs @@ -4168,7 +4168,7 @@ extern { offset: *mut off_t, count: ::size_t) -> ::ssize_t; pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/fuchsia/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/fuchsia/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/hermit/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/hermit/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/hermit/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/hermit/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/hermit/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/hermit/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/hermit/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/hermit/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/hermit/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/hermit/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/hermit/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/hermit/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/lib.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/lib.rs index 2571f81a6c..426b684962 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/lib.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/lib.rs @@ -112,7 +112,7 @@ cfg_if! { } else if #[cfg(all(target_env = "sgx", target_vendor = "fortanix"))] { mod sgx; pub use sgx::*; - } else if #[cfg(target_env = "wasi")] { + } else if #[cfg(any(target_env = "wasi", target_os = "wasi"))] { mod wasi; pub use wasi::*; } else { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/macros.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/macros.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/macros.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/macros.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/redox/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/redox/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/redox/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/redox/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/redox/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/redox/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/redox/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/redox/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/redox/net.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/redox/net.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/redox/net.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/redox/net.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/redox/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/redox/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/redox/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/redox/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/sgx.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/sgx.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/sgx.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/sgx.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/switch.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/switch.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/switch.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/switch.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/apple/b32.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/apple/b32.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/apple/b32.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/apple/b32.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/apple/b64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/apple/b64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/apple/b64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/apple/b64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/apple/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/apple/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/apple/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/apple/mod.rs index 3c0877b275..9483e90b62 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/apple/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/apple/mod.rs @@ -3168,6 +3168,7 @@ extern { name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize) -> ::pid_t; + pub fn login_tty(fd: ::c_int) -> ::c_int; pub fn duplocale(base: ::locale_t) -> ::locale_t; pub fn freelocale(loc: ::locale_t) -> ::c_int; pub fn localeconv_l(loc: ::locale_t) -> *mut lconv; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/dragonfly/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/dragonfly/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/dragonfly/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/arm.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/arm.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/arm.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/arm.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/x86.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/x86.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/x86.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/x86.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/freebsd/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/freebsd/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/mod.rs index 32dbb76968..7a82a45e13 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/freebsdlike/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/freebsdlike/mod.rs @@ -1299,6 +1299,7 @@ extern { name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize) -> ::pid_t; + pub fn login_tty(fd: ::c_int) -> ::c_int; } cfg_if! { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/mod.rs index e1a2f416fd..162be9d7f9 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/mod.rs @@ -594,7 +594,7 @@ extern { pub fn sync(); #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/mod.rs index 3ef2e09e42..c75e6de0a3 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/mod.rs @@ -643,6 +643,7 @@ extern { name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize) -> ::pid_t; + pub fn login_tty(fd: ::c_int) -> ::c_int; pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/arm.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/arm.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/arm.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/arm.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/powerpc.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/powerpc.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/powerpc.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/powerpc.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/sparc64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/sparc64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/sparc64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/sparc64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/x86.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/x86.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/x86.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/x86.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/netbsd/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/netbsd/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/haiku/b32.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/haiku/b32.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/haiku/b32.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/haiku/b32.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/haiku/b64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/haiku/b64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/haiku/b64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/haiku/b64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/haiku/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/haiku/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/haiku/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/haiku/mod.rs index bcf4613ddc..26519a4770 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/haiku/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/haiku/mod.rs @@ -1306,7 +1306,7 @@ extern { pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char, environment: *const *const ::c_char) -> ::c_int; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/hermit/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/hermit/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/hermit/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/hermit/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/hermit/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/hermit/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/hermit/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/hermit/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/hermit/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/hermit/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/hermit/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/hermit/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/mod.rs index 15f7c7f2ea..1be0095343 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/mod.rs @@ -612,9 +612,13 @@ extern { pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")] #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")] - #[cfg_attr(any(target_os = "solaris", target_os = "illumos"), - link_name = "__posix_readdir_r")] #[cfg_attr(target_os = "freebsd", link_name = "readdir_r@FBSD_1.0")] + /// The 64-bit libc on Solaris and illumos only has readdir_r. If a + /// 32-bit Solaris or illumos target is ever created, it should use + /// __posix_readdir_r. See libc(3LIB) on Solaris or illumos: + /// https://illumos.org/man/3lib/libc + /// https://docs.oracle.com/cd/E36784_01/html/E36873/libc-3lib.html + /// https://www.unix.com/man-page/opensolaris/3LIB/libc/ pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) -> ::c_int; #[cfg_attr(all(target_os = "macos", target_arch = "x86"), diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/aarch64/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/aarch64/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/aarch64/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/aarch64/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/arm/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/arm/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/arm/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/arm/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/mod.rs index e2c7fca076..791edb39cf 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/mod.rs @@ -581,7 +581,7 @@ extern { envp: *const *const ::c_char) -> ::c_int; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/newlib/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/newlib/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b32/arm.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b32/arm.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b32/arm.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b32/arm.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b32/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b32/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b32/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b32/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b32/x86.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b32/x86.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b32/x86.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b32/x86.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b64/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b64/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b64/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b64/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b64/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b64/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b64/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b64/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b64/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b64/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/b64/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/b64/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/mod.rs index f7fe61a21d..179893e517 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/android/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/android/mod.rs @@ -2031,7 +2031,7 @@ extern { pub fn setfsuid(uid: ::uid_t) -> ::c_int; pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/emscripten/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/emscripten/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/emscripten/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/emscripten/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/emscripten/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/emscripten/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/emscripten/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/emscripten/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/emscripten/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/emscripten/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/emscripten/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/emscripten/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/mips32.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/mips32.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/mips32.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/mips32.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/mips64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/mips64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/mips64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/mips64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mips/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mips/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mod.rs index 14c2463fa9..3d9ccada03 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/mod.rs @@ -2278,7 +2278,7 @@ extern { count: ::size_t) -> ::ssize_t; pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/arm.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/arm.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/arm.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/arm.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/mips.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/mips.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/mips.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/mips.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/powerpc.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/powerpc.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/powerpc.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/powerpc.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/x86.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/x86.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b32/x86.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b32/x86.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b64/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b64/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b64/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b64/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b64/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b64/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b64/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b64/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b64/powerpc64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b64/powerpc64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b64/powerpc64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b64/powerpc64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b64/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b64/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/b64/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/b64/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/musl/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/musl/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b32/arm.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b32/arm.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b32/arm.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b32/arm.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b32/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b32/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b32/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b32/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b32/powerpc.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b32/powerpc.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b32/powerpc.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b32/powerpc.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b32/x86.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b32/x86.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b32/x86.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b32/x86.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/aarch64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/aarch64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/aarch64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/aarch64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/not_x32.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/not_x32.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/not_x32.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/not_x32.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/powerpc64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/powerpc64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/powerpc64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/powerpc64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/sparc64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/sparc64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/sparc64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/sparc64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/x32.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/x32.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/x32.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/x32.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/x86_64.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/x86_64.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/b64/x86_64.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/b64/x86_64.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/mod.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/mod.rs index 3d177bd276..8a643768de 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/mod.rs @@ -48,6 +48,12 @@ s! { pub si_signo: ::c_int, pub si_errno: ::c_int, pub si_code: ::c_int, + #[deprecated( + since="0.2.54", + note="Please leave a comment on \ + https://github.com/rust-lang/libc/pull/1316 if you're using \ + this field" + )] pub _pad: [::c_int; 29], #[cfg(target_arch = "x86_64")] _align: [u64; 0], @@ -194,6 +200,19 @@ s! { } } +impl siginfo_t { + pub unsafe fn si_addr(&self) -> *mut ::c_void { + #[repr(C)] + struct siginfo_sigfault { + _si_signo: ::c_int, + _si_errno: ::c_int, + _si_code: ::c_int, + si_addr: *mut ::c_void + } + (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr + } +} + s_no_extra_traits! { pub struct utmpx { pub ut_type: ::c_short, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/other/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/other/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/s390x/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/s390x/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/s390x/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/s390x/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/s390x/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/s390x/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/s390x/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/s390x/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/s390x/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/s390x/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/linux/s390x/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/linux/s390x/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/mod.rs index 2af3913097..d0905e11ff 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/notbsd/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/notbsd/mod.rs @@ -1383,6 +1383,11 @@ extern { name: *mut ::c_char, termp: *const termios, winp: *const ::winsize) -> ::c_int; + pub fn forkpty(amaster: *mut ::c_int, + name: *mut ::c_char, + termp: *const termios, + winp: *const ::winsize) -> ::pid_t; + pub fn login_tty(fd: ::c_int) -> ::c_int; pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char, envp: *const *const ::c_char) -> ::c_int; pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char, @@ -1422,7 +1427,3 @@ cfg_if! { // Unknown target_os } } - // pub fn forkpty(amaster: *mut ::c_int, - // name: *mut ::c_char, - // termp: *const termios, - // winp: *const ::winsize) -> ::pid_t; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/solarish/compat.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/solarish/compat.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/solarish/compat.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/solarish/compat.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/solarish/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/solarish/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/solarish/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/solarish/mod.rs index ab36e5730f..1092d152de 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/solarish/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/solarish/mod.rs @@ -1937,7 +1937,7 @@ extern { -> ::c_int; #[cfg_attr(any(target_os = "solaris", target_os = "illumos"), link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/arm/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/arm/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/arm/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/arm/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/arm/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/arm/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/arm/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/arm/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/arm/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/arm/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/arm/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/arm/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips32/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips32/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips32/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips32/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips32/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips32/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips32/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips32/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips32/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips32/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips32/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips32/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips64/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips64/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips64/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips64/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips64/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips64/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips64/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips64/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips64/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips64/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mips64/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mips64/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mips/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mips/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mod.rs index eec3fe01ca..e3baba0614 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/mod.rs @@ -1837,7 +1837,7 @@ extern { pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] - pub fn getgrgid_r(uid: ::uid_t, + pub fn getgrgid_r(gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/l4re.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/l4re.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/l4re.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/l4re.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/no_align.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/no_align.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/no_align.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/no_align.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/other.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/other.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/unix/uclibc/x86_64/other.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/unix/uclibc/x86_64/other.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/wasi.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/wasi.rs similarity index 57% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/wasi.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/wasi.rs index 13af0b5368..a014e4c0fa 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/wasi.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/wasi.rs @@ -26,6 +26,17 @@ pub type clock_t = c_longlong; pub type time_t = c_longlong; pub type c_double = f64; pub type c_float = f32; +pub type ino_t = u64; +pub type sigset_t = c_uchar; +pub type suseconds_t = c_longlong; +pub type mode_t = u32; +pub type dev_t = u64; +pub type uid_t = u32; +pub type gid_t = u32; +pub type nlink_t = u64; +pub type blksize_t = c_long; +pub type blkcnt_t = i64; +pub type nfds_t = c_ulong; pub type __wasi_advice_t = u8; pub type __wasi_clockid_t = u32; @@ -57,14 +68,17 @@ pub type __wasi_userdata_t = u64; pub type __wasi_whence_t = u8; pub type __wasi_preopentype_t = u8; +#[allow(missing_copy_implementations)] #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum FILE {} -impl ::Copy for FILE {} -impl ::Clone for FILE { - fn clone(&self) -> FILE { - *self - } -} +#[allow(missing_copy_implementations)] +#[cfg_attr(feature = "extra_traits", derive(Debug))] +pub enum DIR {} +#[allow(missing_copy_implementations)] +#[cfg_attr(feature = "extra_traits", derive(Debug))] +pub enum __locale_struct {} + +pub type locale_t = *mut __locale_struct; s! { #[repr(align(8))] @@ -87,16 +101,89 @@ s! { pub __tm_nsec: c_int, } + pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, + } + pub struct timespec { pub tv_sec: time_t, pub tv_nsec: c_long, } + pub struct tms { + pub tms_utime: clock_t, + pub tms_stime: clock_t, + pub tms_cutime: clock_t, + pub tms_cstime: clock_t, + } + pub struct itimerspec { pub it_interval: timespec, pub it_value: timespec, } + pub struct iovec { + pub iov_base: *mut c_void, + pub iov_len: size_t, + } + + pub struct lconv { + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, + } + + pub struct pollfd { + pub fd: c_int, + pub events: c_short, + pub revents: c_short, + } + + pub struct rusage { + pub ru_utime: timeval, + pub ru_stime: timeval, + } + + pub struct stat { + pub st_dev: dev_t, + pub st_ino: ino_t, + pub st_nlink: nlink_t, + pub st_mode: mode_t, + pub st_uid: uid_t, + pub st_gid: gid_t, + __pad0: c_uint, + pub st_rdev: dev_t, + pub st_size: off_t, + pub st_blksize: blksize_t, + pub st_blocks: blkcnt_t, + pub st_atim: timespec, + pub st_mtim: timespec, + pub st_ctim: timespec, + __reserved: [c_longlong; 3], + } + pub struct __wasi_dirent_t { pub d_next: __wasi_dircookie_t, pub d_ino: __wasi_inode_t, @@ -197,12 +284,137 @@ s_no_extra_traits! { } +// Declare dirent outside of s! so that it doesn't implement Copy, Eq, Hash, +// etc., since it contains a flexible array member with a dynamic size. +#[repr(C)] +#[allow(missing_copy_implementations)] +#[cfg_attr(feature = "extra_traits", derive(Debug))] +pub struct dirent { + pub d_ino: ino_t, + pub d_type: c_uchar, + /// d_name is declared in WASI libc as a flexible array member, which + /// can't be directly expressed in Rust. As an imperfect workaround, + /// declare it as a zero-length array instead. + pub d_name: [c_char; 0], +} + +pub const EXIT_SUCCESS: c_int = 0; +pub const EXIT_FAILURE: c_int = 1; pub const STDIN_FILENO: c_int = 0; pub const STDOUT_FILENO: c_int = 1; pub const STDERR_FILENO: c_int = 2; pub const SEEK_SET: c_int = 2; pub const SEEK_CUR: c_int = 0; pub const SEEK_END: c_int = 1; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; +pub const FD_SETSIZE: size_t = 1024; +pub const O_APPEND: c_int = __WASI_FDFLAG_APPEND as c_int; +pub const O_DSYNC: c_int = __WASI_FDFLAG_DSYNC as c_int; +pub const O_NONBLOCK: c_int = __WASI_FDFLAG_NONBLOCK as c_int; +pub const O_RSYNC: c_int = __WASI_FDFLAG_RSYNC as c_int; +pub const O_SYNC: c_int = __WASI_FDFLAG_SYNC as c_int; +pub const O_CREAT: c_int = (__WASI_O_CREAT as c_int) << 12; +pub const O_DIRECTORY: c_int = (__WASI_O_DIRECTORY as c_int) << 12; +pub const O_EXCL: c_int = (__WASI_O_EXCL as c_int) << 12; +pub const O_TRUNC: c_int = (__WASI_O_TRUNC as c_int) << 12; +pub const O_NOFOLLOW: c_int = 0x01000000; +pub const O_EXEC: c_int = 0x02000000; +pub const O_RDONLY: c_int = 0x04000000; +pub const O_SEARCH: c_int = 0x08000000; +pub const O_WRONLY: c_int = 0x10000000; +pub const O_RDWR: c_int = O_WRONLY | O_RDONLY; +pub const O_ACCMODE: c_int = O_EXEC | O_RDWR | O_SEARCH; +pub const POSIX_FADV_DONTNEED: c_int = __WASI_ADVICE_DONTNEED as c_int; +pub const POSIX_FADV_NOREUSE: c_int = __WASI_ADVICE_NOREUSE as c_int; +pub const POSIX_FADV_NORMAL: c_int = __WASI_ADVICE_NORMAL as c_int; +pub const POSIX_FADV_RANDOM: c_int = __WASI_ADVICE_RANDOM as c_int; +pub const POSIX_FADV_SEQUENTIAL: c_int = __WASI_ADVICE_SEQUENTIAL as c_int; +pub const POSIX_FADV_WILLNEED: c_int = __WASI_ADVICE_WILLNEED as c_int; +pub const AT_EACCESS: c_int = 0x0; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x1; +pub const AT_SYMLINK_FOLLOW: c_int = 0x2; +pub const AT_REMOVEDIR: c_int = 0x4; + +pub const E2BIG: c_int = __WASI_E2BIG as c_int; +pub const EACCES: c_int = __WASI_EACCES as c_int; +pub const EADDRINUSE: c_int = __WASI_EADDRINUSE as c_int; +pub const EADDRNOTAVAIL: c_int = __WASI_EADDRNOTAVAIL as c_int; +pub const EAFNOSUPPORT: c_int = __WASI_EAFNOSUPPORT as c_int; +pub const EAGAIN: c_int = __WASI_EAGAIN as c_int; +pub const EALREADY: c_int = __WASI_EALREADY as c_int; +pub const EBADF: c_int = __WASI_EBADF as c_int; +pub const EBADMSG: c_int = __WASI_EBADMSG as c_int; +pub const EBUSY: c_int = __WASI_EBUSY as c_int; +pub const ECANCELED: c_int = __WASI_ECANCELED as c_int; +pub const ECHILD: c_int = __WASI_ECHILD as c_int; +pub const ECONNABORTED: c_int = __WASI_ECONNABORTED as c_int; +pub const ECONNREFUSED: c_int = __WASI_ECONNREFUSED as c_int; +pub const ECONNRESET: c_int = __WASI_ECONNRESET as c_int; +pub const EDEADLK: c_int = __WASI_EDEADLK as c_int; +pub const EDESTADDRREQ: c_int = __WASI_EDESTADDRREQ as c_int; +pub const EDOM: c_int = __WASI_EDOM as c_int; +pub const EDQUOT: c_int = __WASI_EDQUOT as c_int; +pub const EEXIST: c_int = __WASI_EEXIST as c_int; +pub const EFAULT: c_int = __WASI_EFAULT as c_int; +pub const EFBIG: c_int = __WASI_EFBIG as c_int; +pub const EHOSTUNREACH: c_int = __WASI_EHOSTUNREACH as c_int; +pub const EIDRM: c_int = __WASI_EIDRM as c_int; +pub const EILSEQ: c_int = __WASI_EILSEQ as c_int; +pub const EINPROGRESS: c_int = __WASI_EINPROGRESS as c_int; +pub const EINTR: c_int = __WASI_EINTR as c_int; +pub const EINVAL: c_int = __WASI_EINVAL as c_int; +pub const EIO: c_int = __WASI_EIO as c_int; +pub const EISCONN: c_int = __WASI_EISCONN as c_int; +pub const EISDIR: c_int = __WASI_EISDIR as c_int; +pub const ELOOP: c_int = __WASI_ELOOP as c_int; +pub const EMFILE: c_int = __WASI_EMFILE as c_int; +pub const EMLINK: c_int = __WASI_EMLINK as c_int; +pub const EMSGSIZE: c_int = __WASI_EMSGSIZE as c_int; +pub const EMULTIHOP: c_int = __WASI_EMULTIHOP as c_int; +pub const ENAMETOOLONG: c_int = __WASI_ENAMETOOLONG as c_int; +pub const ENETDOWN: c_int = __WASI_ENETDOWN as c_int; +pub const ENETRESET: c_int = __WASI_ENETRESET as c_int; +pub const ENETUNREACH: c_int = __WASI_ENETUNREACH as c_int; +pub const ENFILE: c_int = __WASI_ENFILE as c_int; +pub const ENOBUFS: c_int = __WASI_ENOBUFS as c_int; +pub const ENODEV: c_int = __WASI_ENODEV as c_int; +pub const ENOENT: c_int = __WASI_ENOENT as c_int; +pub const ENOEXEC: c_int = __WASI_ENOEXEC as c_int; +pub const ENOLCK: c_int = __WASI_ENOLCK as c_int; +pub const ENOLINK: c_int = __WASI_ENOLINK as c_int; +pub const ENOMEM: c_int = __WASI_ENOMEM as c_int; +pub const ENOMSG: c_int = __WASI_ENOMSG as c_int; +pub const ENOPROTOOPT: c_int = __WASI_ENOPROTOOPT as c_int; +pub const ENOSPC: c_int = __WASI_ENOSPC as c_int; +pub const ENOSYS: c_int = __WASI_ENOSYS as c_int; +pub const ENOTCONN: c_int = __WASI_ENOTCONN as c_int; +pub const ENOTDIR: c_int = __WASI_ENOTDIR as c_int; +pub const ENOTEMPTY: c_int = __WASI_ENOTEMPTY as c_int; +pub const ENOTRECOVERABLE: c_int = __WASI_ENOTRECOVERABLE as c_int; +pub const ENOTSOCK: c_int = __WASI_ENOTSOCK as c_int; +pub const ENOTSUP: c_int = __WASI_ENOTSUP as c_int; +pub const ENOTTY: c_int = __WASI_ENOTTY as c_int; +pub const ENXIO: c_int = __WASI_ENXIO as c_int; +pub const EOVERFLOW: c_int = __WASI_EOVERFLOW as c_int; +pub const EOWNERDEAD: c_int = __WASI_EOWNERDEAD as c_int; +pub const EPERM: c_int = __WASI_EPERM as c_int; +pub const EPIPE: c_int = __WASI_EPIPE as c_int; +pub const EPROTO: c_int = __WASI_EPROTO as c_int; +pub const EPROTONOSUPPORT: c_int = __WASI_EPROTONOSUPPORT as c_int; +pub const EPROTOTYPE: c_int = __WASI_EPROTOTYPE as c_int; +pub const ERANGE: c_int = __WASI_ERANGE as c_int; +pub const EROFS: c_int = __WASI_EROFS as c_int; +pub const ESPIPE: c_int = __WASI_ESPIPE as c_int; +pub const ESRCH: c_int = __WASI_ESRCH as c_int; +pub const ESTALE: c_int = __WASI_ESTALE as c_int; +pub const ETIMEDOUT: c_int = __WASI_ETIMEDOUT as c_int; +pub const ETXTBSY: c_int = __WASI_ETXTBSY as c_int; +pub const EXDEV: c_int = __WASI_EXDEV as c_int; +pub const ENOTCAPABLE: c_int = __WASI_ENOTCAPABLE as c_int; +pub const EOPNOTSUPP: c_int = ENOTSUP; +pub const EWOULDBLOCK: c_int = EAGAIN; pub const __WASI_ADVICE_NORMAL: u8 = 0; pub const __WASI_ADVICE_SEQUENTIAL: u8 = 1; @@ -388,11 +600,14 @@ pub const __WASI_WHENCE_CUR: u8 = 0; pub const __WASI_WHENCE_END: u8 = 1; pub const __WASI_WHENCE_SET: u8 = 2; -#[cfg_attr(feature = "rustc-dep-of-std", - link(name = "c", kind = "static", - cfg(target_feature = "crt-static")))] -#[cfg_attr(feature = "rustc-dep-of-std", - link(name = "c", cfg(not(target_feature = "crt-static"))))] +#[cfg_attr( + feature = "rustc-dep-of-std", + link(name = "c", kind = "static", cfg(target_feature = "crt-static")) +)] +#[cfg_attr( + feature = "rustc-dep-of-std", + link(name = "c", cfg(not(target_feature = "crt-static"))) +)] extern { pub fn _Exit(code: c_int) -> !; pub fn _exit(code: c_int) -> !; @@ -486,6 +701,325 @@ extern { // c: *mut timespec, // ) -> c_int; + pub fn isalnum(c: c_int) -> c_int; + pub fn isalpha(c: c_int) -> c_int; + pub fn iscntrl(c: c_int) -> c_int; + pub fn isdigit(c: c_int) -> c_int; + pub fn isgraph(c: c_int) -> c_int; + pub fn islower(c: c_int) -> c_int; + pub fn isprint(c: c_int) -> c_int; + pub fn ispunct(c: c_int) -> c_int; + pub fn isspace(c: c_int) -> c_int; + pub fn isupper(c: c_int) -> c_int; + pub fn isxdigit(c: c_int) -> c_int; + pub fn tolower(c: c_int) -> c_int; + pub fn toupper(c: c_int) -> c_int; + pub fn setvbuf( + stream: *mut FILE, + buffer: *mut c_char, + mode: c_int, + size: size_t, + ) -> c_int; + pub fn setbuf(stream: *mut FILE, buf: *mut c_char); + pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) + -> *mut c_char; + pub fn atoi(s: *const c_char) -> c_int; + pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double; + pub fn strtol( + s: *const c_char, + endp: *mut *mut c_char, + base: c_int, + ) -> c_long; + pub fn strtoul( + s: *const c_char, + endp: *mut *mut c_char, + base: c_int, + ) -> c_ulong; + + pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char; + pub fn strncpy( + dst: *mut c_char, + src: *const c_char, + n: size_t, + ) -> *mut c_char; + pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char; + pub fn strncat( + s: *mut c_char, + ct: *const c_char, + n: size_t, + ) -> *mut c_char; + pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int; + pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int; + pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int; + pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char; + pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char; + pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t; + pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t; + pub fn strdup(cs: *const c_char) -> *mut c_char; + pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char; + pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char; + pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int; + pub fn strncasecmp( + s1: *const c_char, + s2: *const c_char, + n: size_t, + ) -> c_int; + pub fn strlen(cs: *const c_char) -> size_t; + pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t; + pub fn strerror(n: c_int) -> *mut c_char; + pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char; + pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; + + pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; + pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int; + pub fn memcpy( + dest: *mut c_void, + src: *const c_void, + n: size_t, + ) -> *mut c_void; + pub fn memmove( + dest: *mut c_void, + src: *const c_void, + n: size_t, + ) -> *mut c_void; + pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void; + + pub fn fprintf( + stream: *mut ::FILE, + format: *const ::c_char, + ... + ) -> ::c_int; + pub fn printf(format: *const ::c_char, ...) -> ::c_int; + pub fn snprintf( + s: *mut ::c_char, + n: ::size_t, + format: *const ::c_char, + ... + ) -> ::c_int; + pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int; + pub fn fscanf( + stream: *mut ::FILE, + format: *const ::c_char, + ... + ) -> ::c_int; + pub fn scanf(format: *const ::c_char, ...) -> ::c_int; + pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) + -> ::c_int; + pub fn getchar_unlocked() -> ::c_int; + pub fn putchar_unlocked(c: ::c_int) -> ::c_int; + + pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int; + pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; + pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; + pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; + pub fn fileno(stream: *mut ::FILE) -> ::c_int; + pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int; + pub fn opendir(dirname: *const c_char) -> *mut ::DIR; + pub fn fdopendir(fd: ::c_int) -> *mut ::DIR; + pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; + pub fn closedir(dirp: *mut ::DIR) -> ::c_int; + pub fn rewinddir(dirp: *mut ::DIR); + + pub fn openat( + dirfd: ::c_int, + pathname: *const ::c_char, + flags: ::c_int, + ... + ) -> ::c_int; + pub fn fstatat( + dirfd: ::c_int, + pathname: *const ::c_char, + buf: *mut stat, + flags: ::c_int, + ) -> ::c_int; + pub fn linkat( + olddirfd: ::c_int, + oldpath: *const ::c_char, + newdirfd: ::c_int, + newpath: *const ::c_char, + flags: ::c_int, + ) -> ::c_int; + pub fn mkdirat( + dirfd: ::c_int, + pathname: *const ::c_char, + mode: ::mode_t, + ) -> ::c_int; + pub fn readlinkat( + dirfd: ::c_int, + pathname: *const ::c_char, + buf: *mut ::c_char, + bufsiz: ::size_t, + ) -> ::ssize_t; + pub fn renameat( + olddirfd: ::c_int, + oldpath: *const ::c_char, + newdirfd: ::c_int, + newpath: *const ::c_char, + ) -> ::c_int; + pub fn symlinkat( + target: *const ::c_char, + newdirfd: ::c_int, + linkpath: *const ::c_char, + ) -> ::c_int; + pub fn unlinkat( + dirfd: ::c_int, + pathname: *const ::c_char, + flags: ::c_int, + ) -> ::c_int; + + pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; + pub fn close(fd: ::c_int) -> ::c_int; + pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long; + pub fn getopt( + argc: ::c_int, + argv: *const *mut c_char, + optstr: *const c_char, + ) -> ::c_int; + pub fn isatty(fd: ::c_int) -> ::c_int; + pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int; + pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t; + pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long; + pub fn pause() -> ::c_int; + pub fn rmdir(path: *const c_char) -> ::c_int; + pub fn sleep(secs: ::c_uint) -> ::c_uint; + pub fn unlink(c: *const c_char) -> ::c_int; + pub fn pread( + fd: ::c_int, + buf: *mut ::c_void, + count: ::size_t, + offset: off_t, + ) -> ::ssize_t; + pub fn pwrite( + fd: ::c_int, + buf: *const ::c_void, + count: ::size_t, + offset: off_t, + ) -> ::ssize_t; + + pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int; + + pub fn fsync(fd: ::c_int) -> ::c_int; + + pub fn symlink(path1: *const c_char, path2: *const c_char) -> ::c_int; + + pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int; + + pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int; + + pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; + pub fn times(buf: *mut ::tms) -> ::clock_t; + + pub fn strerror_r( + errnum: ::c_int, + buf: *mut c_char, + buflen: ::size_t, + ) -> ::c_int; + + pub fn usleep(secs: ::c_uint) -> ::c_int; + pub fn send( + socket: ::c_int, + buf: *const ::c_void, + len: ::size_t, + flags: ::c_int, + ) -> ::ssize_t; + pub fn recv( + socket: ::c_int, + buf: *mut ::c_void, + len: ::size_t, + flags: ::c_int, + ) -> ::ssize_t; + pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int; + pub fn setlocale( + category: ::c_int, + locale: *const ::c_char, + ) -> *mut ::c_char; + pub fn localeconv() -> *mut lconv; + + pub fn readlink( + path: *const c_char, + buf: *mut c_char, + bufsz: ::size_t, + ) -> ::ssize_t; + + pub fn timegm(tm: *mut ::tm) -> time_t; + + pub fn sysconf(name: ::c_int) -> ::c_long; + + pub fn fseeko( + stream: *mut ::FILE, + offset: ::off_t, + whence: ::c_int, + ) -> ::c_int; + pub fn ftello(stream: *mut ::FILE) -> ::off_t; + + pub fn strcasestr(cs: *const c_char, ct: *const c_char) -> *mut c_char; + pub fn getline( + lineptr: *mut *mut c_char, + n: *mut size_t, + stream: *mut FILE, + ) -> ssize_t; + + pub fn faccessat( + dirfd: ::c_int, + pathname: *const ::c_char, + mode: ::c_int, + flags: ::c_int, + ) -> ::c_int; + pub fn writev( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + ) -> ::ssize_t; + pub fn readv( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + ) -> ::ssize_t; + pub fn pwritev( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t, + ) -> ::ssize_t; + pub fn preadv( + fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t, + ) -> ::ssize_t; + pub fn posix_fadvise( + fd: ::c_int, + offset: ::off_t, + len: ::off_t, + advise: ::c_int, + ) -> ::c_int; + pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + pub fn utimensat( + dirfd: ::c_int, + path: *const ::c_char, + times: *const ::timespec, + flag: ::c_int, + ) -> ::c_int; + pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + pub fn memrchr( + cx: *const ::c_void, + c: ::c_int, + n: ::size_t, + ) -> *mut ::c_void; + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn duplocale(base: ::locale_t) -> ::locale_t; + pub fn freelocale(loc: ::locale_t); + pub fn newlocale( + mask: ::c_int, + locale: *const ::c_char, + base: ::locale_t, + ) -> ::locale_t; + pub fn uselocale(loc: ::locale_t) -> ::locale_t; + pub fn __wasilibc_register_preopened_fd( fd: c_int, path: *const c_char, @@ -494,6 +1028,12 @@ extern { pub fn __wasilibc_rmfileat(fd: c_int, path: *const c_char) -> c_int; pub fn __wasilibc_rmdirat(fd: c_int, path: *const c_char) -> c_int; pub fn __wasilibc_init_preopen(); + pub fn __wasilibc_find_relpath( + path: *const c_char, + rights_base: __wasi_rights_t, + rights_inheriting: __wasi_rights_t, + relative_path: *mut *const c_char, + ) -> c_int; pub fn arc4random() -> u32; pub fn arc4random_buf(a: *mut c_void, b: size_t); diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/windows/gnu.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/windows/gnu.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/windows/gnu.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/windows/gnu.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/windows/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/windows/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/windows/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/windows/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/windows/msvc.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/windows/msvc.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/windows/msvc.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.54/src/windows/msvc.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/.cargo_vcs_info.json deleted file mode 100644 index 20de4b2069..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/.cargo_vcs_info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "git": { - "sha1": "9d70d8c6396de9d32ddfa5b18f7fb96b0c36b625" - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/.cargo_vcs_info.json new file mode 100644 index 0000000000..8f15aab806 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "0cbbcada434c529334ff0a99dab2ffbcfe372ae5" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/CHANGELOG.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/CHANGELOG.md similarity index 87% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/CHANGELOG.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/CHANGELOG.md index 961946e1d9..bbb21dcbf2 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/CHANGELOG.md +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.4] - 2019-05-02 +- Change error conversion code to partially fix #738 + ## [0.1.3] - 2019-02-05 - Use libc in `no_std` mode to fix #723 diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/COPYRIGHT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/COPYRIGHT similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/COPYRIGHT rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/COPYRIGHT diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/Cargo.toml similarity index 92% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/Cargo.toml index 962135452c..387b8073ff 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,13 +12,13 @@ [package] name = "rand_jitter" -version = "0.1.3" +version = "0.1.4" authors = ["The Rand Project Developers"] description = "Random number generator based on timing jitter" documentation = "https://docs.rs/rand_jitter" readme = "README.md" keywords = ["random", "rng", "os"] -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/rust-random/rand" [dependencies.log] version = "0.4" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/Cargo.toml.orig similarity index 94% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/Cargo.toml.orig index c8a350b0e0..d968ea4bd3 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/Cargo.toml.orig @@ -1,8 +1,8 @@ [package] name = "rand_jitter" -version = "0.1.3" +version = "0.1.4" authors = ["The Rand Project Developers"] -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/rust-random/rand" documentation = "https://docs.rs/rand_jitter" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/LICENSE-APACHE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/LICENSE-APACHE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/LICENSE-APACHE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/LICENSE-MIT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/LICENSE-MIT similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/LICENSE-MIT rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/LICENSE-MIT diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/README.md similarity index 94% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/README.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/README.md index cda5d62ad3..8e0805faeb 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/README.md +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/README.md @@ -1,11 +1,11 @@ # rand_jitter [![Build Status](https://travis-ci.org/rust-random/rand.svg?branch=master)](https://travis-ci.org/rust-random/rand) [![Build Status](https://ci.appveyor.com/api/projects/status/github/rust-random/rand?svg=true)](https://ci.appveyor.com/project/rust-random/rand) -[![Latest version](https://img.shields.io/crates/v/rand_os.svg)](https://crates.io/crates/rand_jitter) +[![Latest version](https://img.shields.io/crates/v/rand_jitter.svg)](https://crates.io/crates/rand_jitter) [![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/) [![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_jitter) -[![API](https://docs.rs/rand_os/badge.svg)](https://docs.rs/rand_jitter) -[![Minimum rustc version](https://img.shields.io/badge/rustc-1.22+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements) +[![API](https://docs.rs/rand_jitter/badge.svg)](https://docs.rs/rand_jitter) +[![Minimum rustc version](https://img.shields.io/badge/rustc-1.32+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements) Non-physical true random number generator based on timing jitter. diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/benches/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/benches/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/benches/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/benches/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/dummy_log.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/dummy_log.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/dummy_log.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/dummy_log.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/error.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/error.rs similarity index 87% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/error.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/error.rs index b8bc37f6b3..a3483e84d0 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/error.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/error.rs @@ -59,8 +59,12 @@ impl From for Error { fn from(err: TimerError) -> Error { // Timer check is already quite permissive of failures so we don't // expect false-positive failures, i.e. any error is irrecoverable. - Error::with_cause(ErrorKind::Unavailable, - "timer jitter failed basic quality tests", err) + #[cfg(feature = "std")] { + Error::with_cause(ErrorKind::Unavailable, "timer jitter failed basic quality tests", err) + } + #[cfg(not(feature = "std"))] { + Error::new(ErrorKind::Unavailable, "timer jitter failed basic quality tests") + } } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/lib.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/lib.rs index ab9ae396de..338a6b966a 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/lib.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/lib.rs @@ -75,7 +75,10 @@ pub use error::TimerError; use core::{fmt, mem, ptr}; #[cfg(feature = "std")] -use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; +use std::sync::atomic::{AtomicUsize, Ordering}; +#[cfg(feature = "std")] +#[allow(deprecated)] // Required for compatibility with Rust < 1.24. +use std::sync::atomic::ATOMIC_USIZE_INIT; const MEMORY_BLOCKS: usize = 64; const MEMORY_BLOCKSIZE: usize = 32; @@ -167,6 +170,7 @@ impl Clone for JitterRng { // Initialise to zero; must be positive #[cfg(all(feature = "std", not(target_arch = "wasm32")))] +#[allow(deprecated)] static JITTER_ROUNDS: AtomicUsize = ATOMIC_USIZE_INIT; impl JitterRng { @@ -503,7 +507,7 @@ impl JitterRng { /// Basic quality tests on the timer, by measuring CPU timing jitter a few /// hundred times. /// - /// If succesful, this will return the estimated number of rounds necessary + /// If successful, this will return the estimated number of rounds necessary /// to collect 64 bits of entropy. Otherwise a [`TimerError`] with the cause /// of the failure will be returned. pub fn test_timer(&mut self) -> Result { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/platform.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/platform.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/src/platform.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/platform.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/tests/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/tests/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.3/tests/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/tests/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.cargo_vcs_info.json deleted file mode 100644 index 855d172dab..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.cargo_vcs_info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "git": { - "sha1": "066f573d35980097936dfae221ff81942aee9c1c" - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/hint.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/hint.rs deleted file mode 100644 index 37574df723..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/hint.rs +++ /dev/null @@ -1,16 +0,0 @@ -//! Hints (suggestions at the right of the prompt as you type). - -/// Hints provider -pub trait Hinter { - /// Takes the currently edited `line` with the cursor `pos`ition and - /// returns the string that should be displayed or `None` - /// if no hint is available for the text the user currently typed. - // TODO Validate: called while editing line but not while moving cursor. - fn hint(&self, line: &str, pos: usize) -> Option; -} - -impl Hinter for () { - fn hint(&self, _line: &str, _pos: usize) -> Option { - None - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.cargo_vcs_info.json new file mode 100644 index 0000000000..6b24187014 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "a8bab4dfb6f8121d4efcd63ab3f06a971e3189cd" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.gitignore b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.gitignore similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.gitignore rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.gitignore diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.travis.yml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/.travis.yml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/.travis.yml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/Cargo.toml similarity index 88% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/Cargo.toml index 0563a693b3..ffc723fee1 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -13,7 +13,7 @@ [package] edition = "2018" name = "rustyline" -version = "3.0.0" +version = "4.0.0" authors = ["Katsu Kawakami "] description = "Rustyline, a readline implementation based on Antirez's Linenoise" documentation = "http://docs.rs/rustyline" @@ -24,6 +24,7 @@ license = "MIT" repository = "https://github.com/kkawakam/rustyline" [dependencies.dirs] version = "1.0" +optional = true [dependencies.libc] version = "0.2" @@ -42,10 +43,17 @@ version = "0.1" [dev-dependencies.assert_matches] version = "1.2" +[dev-dependencies.env_logger] +version = "0.6" + [dev-dependencies.tempdir] version = "0.3" + +[features] +default = ["with-dirs"] +with-dirs = ["dirs"] [target."cfg(unix)".dependencies.nix] -version = "0.11" +version = "0.13" [target."cfg(unix)".dependencies.utf8parse] version = "0.1" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/Cargo.toml.orig similarity index 85% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/Cargo.toml.orig index 4a283dd630..d1f7fdcc38 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "rustyline" -version = "3.0.0" +version = "4.0.0" authors = ["Katsu Kawakami "] edition = "2018" description = "Rustyline, a readline implementation based on Antirez's Linenoise" @@ -17,7 +17,7 @@ appveyor = { repository = "kkawakam/rustyline" } maintenance = { status = "actively-developed" } [dependencies] -dirs = "1.0" +dirs = { version = "1.0", optional = true } libc = "0.2" log = "0.4" unicode-width = "0.1" @@ -25,12 +25,17 @@ unicode-segmentation = "1.0" memchr = "2.0" [target.'cfg(unix)'.dependencies] -nix = "0.11" +nix = "0.13" utf8parse = "0.1" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["consoleapi", "handleapi", "minwindef", "processenv", "winbase", "wincon", "winuser"] } [dev-dependencies] +env_logger = "0.6" tempdir = "0.3" assert_matches = "1.2" + +[features] +default = ["with-dirs"] +with-dirs = ["dirs"] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/LICENSE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/LICENSE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/LICENSE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/LICENSE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/README.md similarity index 92% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/README.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/README.md index d50e67643c..6acc959ca8 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/README.md +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/README.md @@ -61,7 +61,7 @@ to your `Cargo.toml`: ```toml [dependencies] -rustyline = "3.0.0" +rustyline = "4.0.0" ``` ## Features @@ -71,7 +71,7 @@ rustyline = "3.0.0" - Filename completion - History search ([Searching for Commands in the History](http://tiswww.case.edu/php/chet/readline/readline.html#SEC8)) - Kill ring ([Killing Commands](http://tiswww.case.edu/php/chet/readline/readline.html#IDX3)) - - Multi line mode (line wrapping) + - Multi line support (line wrapping) - Word commands - Hints @@ -207,7 +207,7 @@ $ bind -p Library | Lang | OS | Term | Unicode | History | Completion | Keymap | Kill Ring | Undo | Colors | Hint/Auto suggest | -------- | ---- | -- | ---- | ------- | ------- | ---------- | ------- | --------- | ---- | ------ | ----------------- | -[go-prompt][] | Go | Ux/win | ANSI | Yes | Yes | any | Emacs/prog | No | No | Yes | Yes | +[go-prompt][] | Go | Ux/win | ANSI | Yes | Yes | any | Emacs/prog | No | No | Yes | Yes | [Haskeline][] | Haskell | Ux/Win | Any | Yes | Yes | any | Emacs/vi/conf | Yes | Yes | ? | ? | [linefeed][] | Rust | Ux/Win | Any | | Yes | any | Emacs/conf | Yes | No | ? | No | [linenoise][] | C | Ux | ANSI | No | Yes | only line | Emacs | No | No | Ux | Yes | @@ -217,6 +217,7 @@ Library | Lang | OS | Term | Unicode | History | Comple [rb-readline][] | Ruby | Ux/Win | ANSI | Yes | Yes | only word | Emacs/vi/conf | Yes | Yes | ? | No | [replxx][] | C/C++ | Ux/Win | ANSI | Yes | Yes | only line | Emacs | Yes | No | Ux/Win | Yes | Rustyline | Rust | Ux/Win | ANSI | Yes | Yes | any | Emacs/vi/bind | Yes | Yes | Ux/Win 10+ | Yes | +[terminal_cli][] | Rust | Ux | ANSI | ? | No | only line | ? | No | No | ? | ? | [go-prompt]: https://github.com/c-bata/go-prompt [Haskeline]: https://github.com/judah/haskeline @@ -227,3 +228,16 @@ Rustyline | Rust | Ux/Win | ANSI | Yes | Yes | any [prompt_toolkit]: https://github.com/jonathanslenders/python-prompt-toolkit [rb-readline]: https://github.com/ConnorAtherton/rb-readline [replxx]: https://github.com/AmokHuginnsson/replxx +[terminal_cli]: https://github.com/hashmismatch/terminal_cli.rs + +## Multi line support + +This is a very simple feature that simply causes lines that are longer +than the current terminal width to be displayed on the next visual +line instead of horizontally scrolling as more characters are +typed. Currently this feature is always enabled and there is no +configuration option to disable it. + +_This feature does not allow the end user to hit a special key +sequence and enter a mode where hitting the return key will cause a +literal newline to be added to the input buffer_. diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/TODO.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/TODO.md similarity index 77% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/TODO.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/TODO.md index a857df9974..d0fd37f50e 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/TODO.md +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/TODO.md @@ -32,7 +32,7 @@ Grapheme Hints Callback - [X] Not implemented on windows -- [ ] Do an implementation based on previous history +- [X] Do an implementation based on previous history History - [ ] Move to the history line n @@ -42,9 +42,8 @@ each line input session. - [ ] history_truncate_file Input -- [ ] Password input (#58) +- [ ] Password input (#58) (https://github.com/conradkdotcom/rpassword) (https://github.com/antirez/linenoise/issues/125) - [X] quoted insert (#65) -- [ ] quoted TAB (`\t`) insert and width - [ ] Overwrite mode (em-toggle-overwrite, vi-replace-mode, rl_insert_mode) - [ ] Encoding - [ ] [Ctrl-][Alt-][Shift-] (#121) @@ -52,6 +51,9 @@ Input Layout - [ ] Redraw perf (https://crates.io/crates/cassowary) +Misc +- [ ] fallible iterator (https://docs.rs/fallible-iterator/0.2.1/fallible_iterator/) + Mouse - [ ] Mouse support @@ -79,10 +81,12 @@ Undo Unix - [ ] Terminfo (https://github.com/Stebalien/term) - [ ] [ncurses](https://crates.io/crates/ncurses) alternative backend ? -- [ ] [bracketed paste mode](https://cirw.in/blog/bracketed-paste) +- [X] [bracketed paste mode](https://cirw.in/blog/bracketed-paste) - [ ] async stdin (https://github.com/Rufflewind/tokio-file-unix) Windows - [ ] is_atty is not working with Cygwin/MSYS (https://github.com/softprops/atty works but then how to make `enable_raw_mode` works ?) + (https://github.com/mitsuhiko/console/blob/master/src/windows_term.rs#L285) + (https://github.com/mattn/go-isatty/blob/master/isatty_windows.go, https://github.com/mattn/go-tty/blob/master/tty_windows.go#L143) - [X] UTF-16 surrogate pair -- [ ] handle ANSI escape code (https://docs.rs/console/0.6.1/console/fn.strip_ansi_codes.html ? https://github.com/mattn/go-colorable/blob/master/colorable_windows.go) +- [ ] handle ANSI escape code (#61) (https://github.com/DanielKeep/rust-ansi-interpreter) diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/appveyor.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/appveyor.yml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/appveyor.yml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/appveyor.yml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/examples/example.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/examples/example.rs similarity index 65% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/examples/example.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/examples/example.rs index 6d78287000..8bb2e7e8fc 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/examples/example.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/examples/example.rs @@ -1,34 +1,35 @@ -use log::{Level, LevelFilter, Metadata, Record, SetLoggerError}; +use env_logger; use std::borrow::Cow::{self, Borrowed, Owned}; use rustyline::completion::{Completer, FilenameCompleter, Pair}; use rustyline::config::OutputStreamType; use rustyline::error::ReadlineError; use rustyline::highlight::{Highlighter, MatchingBracketHighlighter}; -use rustyline::hint::Hinter; -use rustyline::{Cmd, CompletionType, Config, EditMode, Editor, Helper, KeyPress}; +use rustyline::hint::{Hinter, HistoryHinter}; +use rustyline::{Cmd, CompletionType, Config, Context, EditMode, Editor, Helper, KeyPress}; static COLORED_PROMPT: &'static str = "\x1b[1;32m>>\x1b[0m "; static PROMPT: &'static str = ">> "; -struct MyHelper(FilenameCompleter, MatchingBracketHighlighter); +struct MyHelper(FilenameCompleter, MatchingBracketHighlighter, HistoryHinter); impl Completer for MyHelper { type Candidate = Pair; - fn complete(&self, line: &str, pos: usize) -> Result<(usize, Vec), ReadlineError> { - self.0.complete(line, pos) + fn complete( + &self, + line: &str, + pos: usize, + ctx: &Context<'_>, + ) -> Result<(usize, Vec), ReadlineError> { + self.0.complete(line, pos, ctx) } } impl Hinter for MyHelper { - fn hint(&self, line: &str, _pos: usize) -> Option { - if line == "hello" { - Some(" World".to_owned()) - } else { - None - } + fn hint(&self, line: &str, pos: usize, ctx: &Context<'_>) -> Option { + self.2.hint(line, pos, ctx) } } @@ -57,14 +58,18 @@ impl Highlighter for MyHelper { impl Helper for MyHelper {} fn main() { - init_logger().is_ok(); + env_logger::init(); let config = Config::builder() .history_ignore_space(true) .completion_type(CompletionType::List) .edit_mode(EditMode::Emacs) .output_stream(OutputStreamType::Stdout) .build(); - let h = MyHelper(FilenameCompleter::new(), MatchingBracketHighlighter::new()); + let h = MyHelper( + FilenameCompleter::new(), + MatchingBracketHighlighter::new(), + HistoryHinter {}, + ); let mut rl = Editor::with_config(config); rl.set_helper(Some(h)); rl.bind_sequence(KeyPress::Meta('N'), Cmd::HistorySearchForward); @@ -95,26 +100,3 @@ fn main() { } rl.save_history("history.txt").unwrap(); } - -static LOGGER: Logger = Logger; -struct Logger; - -impl log::Log for Logger { - fn enabled(&self, metadata: &Metadata<'_>) -> bool { - metadata.level() <= Level::Debug - } - - fn log(&self, record: &Record<'_>) { - if self.enabled(record.metadata()) { - eprintln!("{} - {}", record.level(), record.args()); - } - } - - fn flush(&self) {} -} - -fn init_logger() -> Result<(), SetLoggerError> { - log::set_logger(&LOGGER)?; - log::set_max_level(LevelFilter::Info); - Ok(()) -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/rustfmt.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/rustfmt.toml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/rustfmt.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/rustfmt.toml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/completion.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/completion.rs similarity index 91% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/completion.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/completion.rs index 9aa914a536..a59b9fe060 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/completion.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/completion.rs @@ -3,8 +3,8 @@ use std::borrow::Cow::{self, Borrowed, Owned}; use std::fs; use std::path::{self, Path}; -use super::Result; use crate::line_buffer::LineBuffer; +use crate::{Context, Result}; use memchr::memchr; // TODO: let the implementers choose/find word boundaries ??? @@ -54,7 +54,12 @@ pub trait Completer { /// partial word to be completed. /// /// ("ls /usr/loc", 11) => Ok((3, vec!["/usr/local/"])) - fn complete(&self, line: &str, pos: usize) -> Result<(usize, Vec)>; + fn complete( + &self, + line: &str, + pos: usize, + ctx: &Context<'_>, + ) -> Result<(usize, Vec)>; /// Updates the edited `line` with the `elected` candidate. fn update(&self, line: &mut LineBuffer, start: usize, elected: &str) { let end = line.pos(); @@ -65,7 +70,12 @@ pub trait Completer { impl Completer for () { type Candidate = String; - fn complete(&self, _line: &str, _pos: usize) -> Result<(usize, Vec)> { + fn complete( + &self, + _line: &str, + _pos: usize, + _ctx: &Context<'_>, + ) -> Result<(usize, Vec)> { Ok((0, Vec::with_capacity(0))) } @@ -77,8 +87,13 @@ impl Completer for () { impl<'c, C: ?Sized + Completer> Completer for &'c C { type Candidate = C::Candidate; - fn complete(&self, line: &str, pos: usize) -> Result<(usize, Vec)> { - (**self).complete(line, pos) + fn complete( + &self, + line: &str, + pos: usize, + ctx: &Context<'_>, + ) -> Result<(usize, Vec)> { + (**self).complete(line, pos, ctx) } fn update(&self, line: &mut LineBuffer, start: usize, elected: &str) { @@ -91,8 +106,8 @@ macro_rules! box_completer { impl Completer for $id { type Candidate = C::Candidate; - fn complete(&self, line: &str, pos: usize) -> Result<(usize, Vec)> { - (**self).complete(line, pos) + fn complete(&self, line: &str, pos: usize, ctx: &Context<'_>) -> Result<(usize, Vec)> { + (**self).complete(line, pos, ctx) } fn update(&self, line: &mut LineBuffer, start: usize, elected: &str) { (**self).update(line, start, elected) @@ -163,7 +178,7 @@ impl Default for FilenameCompleter { impl Completer for FilenameCompleter { type Candidate = Pair; - fn complete(&self, line: &str, pos: usize) -> Result<(usize, Vec)> { + fn complete(&self, line: &str, pos: usize, _ctx: &Context<'_>) -> Result<(usize, Vec)> { let (start, path, esc_char, break_chars, quote) = if let Some((idx, quote)) = find_unclosed_quote(&line[..pos]) { let start = idx + 1; @@ -196,10 +211,11 @@ impl Completer for FilenameCompleter { /// Remove escape char pub fn unescape(input: &str, esc_char: Option) -> Cow<'_, str> { - if esc_char.is_none() { + let esc_char = if let Some(c) = esc_char { + c + } else { return Borrowed(input); - } - let esc_char = esc_char.unwrap(); + }; if !input.chars().any(|c| c == esc_char) { return Borrowed(input); } @@ -242,14 +258,15 @@ pub fn escape( if n == 0 { return input; // no need to escape } - if esc_char.is_none() { + let esc_char = if let Some(c) = esc_char { + c + } else { if cfg!(windows) && quote == Quote::None { input.insert(0, '"'); // force double quote return input; } return input; - } - let esc_char = esc_char.unwrap(); + }; let mut result = String::with_capacity(input.len() + n); for c in input.chars() { @@ -267,6 +284,7 @@ fn filename_complete( break_chars: &[u8], quote: Quote, ) -> Result> { + #[cfg(feature = "with-dirs")] use dirs::home_dir; use std::env::current_dir; @@ -279,12 +297,19 @@ fn filename_complete( let dir_path = Path::new(dir_name); let dir = if dir_path.starts_with("~") { // ~[/...] - if let Some(home) = home_dir() { - match dir_path.strip_prefix("~") { - Ok(rel_path) => home.join(rel_path), - _ => home, + #[cfg(feature = "with-dirs")] + { + if let Some(home) = home_dir() { + match dir_path.strip_prefix("~") { + Ok(rel_path) => home.join(rel_path), + _ => home, + } + } else { + dir_path.to_path_buf() } - } else { + } + #[cfg(not(feature = "with-dirs"))] + { dir_path.to_path_buf() } } else if dir_path.is_relative() { @@ -345,8 +370,8 @@ pub fn extract_word<'l>( } let mut start = None; for (i, c) in line.char_indices().rev() { - if esc_char.is_some() && start.is_some() { - if esc_char.unwrap() == c { + if let (Some(esc_char), true) = (esc_char, start.is_some()) { + if esc_char == c { // escaped break char start = None; continue; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/config.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/config.rs similarity index 93% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/config.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/config.rs index 5f5a768221..d92a603829 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/config.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/config.rs @@ -24,6 +24,8 @@ pub struct Config { color_mode: ColorMode, /// Whether to use stdout or stderr output_stream: OutputStreamType, + /// Horizontal space taken by a tab. + tab_stop: usize, } impl Config { @@ -109,6 +111,15 @@ impl Config { pub(crate) fn set_output_stream(&mut self, stream: OutputStreamType) { self.output_stream = stream; } + + /// Horizontal space taken by a tab. + pub fn tab_stop(&self) -> usize { + self.tab_stop + } + + pub(crate) fn set_tab_stop(&mut self, tab_stop: usize) { + self.tab_stop = tab_stop; + } } impl Default for Config { @@ -124,6 +135,7 @@ impl Default for Config { auto_add_history: false, color_mode: ColorMode::Enabled, output_stream: OutputStreamType::Stdout, + tab_stop: 8, } } } @@ -257,6 +269,14 @@ impl Builder { self } + /// Horizontal space taken by a tab. + /// + /// By default, `8` + pub fn tab_stop(mut self, tab_stop: usize) -> Self { + self.set_tab_stop(tab_stop); + self + } + pub fn build(self) -> Config { self.p } @@ -336,4 +356,11 @@ pub trait Configurer { fn set_output_stream(&mut self, stream: OutputStreamType) { self.config_mut().set_output_stream(stream); } + + /// Horizontal space taken by a tab. + /// + /// By default, `8` + fn set_tab_stop(&mut self, tab_stop: usize) { + self.config_mut().set_tab_stop(tab_stop); + } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/edit.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/edit.rs similarity index 76% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/edit.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/edit.rs index 541c21b220..eedaa07af1 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/edit.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/edit.rs @@ -6,10 +6,9 @@ use std::rc::Rc; use unicode_segmentation::UnicodeSegmentation; use unicode_width::UnicodeWidthChar; -use super::Result; +use super::{Context, Helper, Result}; use crate::highlight::Highlighter; -use crate::hint::Hinter; -use crate::history::{Direction, History}; +use crate::history::Direction; use crate::keymap::{Anchor, At, CharSearch, Cmd, Movement, RepeatCount, Word}; use crate::keymap::{InputState, Refresher}; use crate::line_buffer::{LineBuffer, WordAction, MAX_LINE}; @@ -18,7 +17,7 @@ use crate::undo::Changeset; /// Represent the state during line editing. /// Implement rendering. -pub struct State<'out, 'prompt> { +pub struct State<'out, 'prompt, H: Helper> { pub out: &'out mut dyn Renderer, prompt: &'prompt str, // Prompt to display (rl_prompt) prompt_size: Position, // Prompt Unicode/visible width and height @@ -26,24 +25,28 @@ pub struct State<'out, 'prompt> { pub cursor: Position, /* Cursor position (relative to the start of the prompt * for `row`) */ pub old_rows: usize, // Number of rows used so far (from start of prompt to end of input) - history_index: usize, // The history index we are currently editing saved_line_for_history: LineBuffer, // Current edited line before history browsing byte_buffer: [u8; 4], pub changes: Rc>, // changes to line, for undo/redo - pub hinter: Option<&'out dyn Hinter>, - pub highlighter: Option<&'out dyn Highlighter>, - no_hint: bool, // `false` if an hint has been displayed - highlight_char: bool, // `true` if a char has been highlighted + pub helper: Option<&'out H>, + pub ctx: Context<'out>, // Give access to history for `hinter` + pub hint: Option, // last hint displayed + highlight_char: bool, // `true` if a char has been highlighted } -impl<'out, 'prompt> State<'out, 'prompt> { +enum Info<'m> { + NoHint, + Hint, + Msg(Option<&'m str>), +} + +impl<'out, 'prompt, H: Helper> State<'out, 'prompt, H> { pub fn new( out: &'out mut dyn Renderer, prompt: &'prompt str, - history_index: usize, - hinter: Option<&'out dyn Hinter>, - highlighter: Option<&'out dyn Highlighter>, - ) -> State<'out, 'prompt> { + helper: Option<&'out H>, + ctx: Context<'out>, + ) -> State<'out, 'prompt, H> { let capacity = MAX_LINE; let prompt_size = out.calculate_position(prompt, Position::default()); State { @@ -53,17 +56,24 @@ impl<'out, 'prompt> State<'out, 'prompt> { line: LineBuffer::with_capacity(capacity), cursor: prompt_size, old_rows: 0, - history_index, saved_line_for_history: LineBuffer::with_capacity(capacity), byte_buffer: [0; 4], changes: Rc::new(RefCell::new(Changeset::new())), - hinter, - highlighter, - no_hint: true, + helper, + ctx, + hint: None, highlight_char: false, } } + pub fn highlighter(&self) -> Option<&dyn Highlighter> { + if self.out.colors_enabled() { + self.helper.map(|h| h as &dyn Highlighter) + } else { + None + } + } + pub fn next_cmd( &mut self, input_state: &mut InputState, @@ -106,7 +116,7 @@ impl<'out, 'prompt> State<'out, 'prompt> { } if self.highlight_char() { let prompt_size = self.prompt_size; - self.refresh(self.prompt, prompt_size, None)?; + self.refresh(self.prompt, prompt_size, Info::NoHint)?; } else { self.out.move_cursor(self.cursor, cursor)?; } @@ -114,15 +124,25 @@ impl<'out, 'prompt> State<'out, 'prompt> { Ok(()) } - fn refresh(&mut self, prompt: &str, prompt_size: Position, hint: Option) -> Result<()> { + fn refresh(&mut self, prompt: &str, prompt_size: Position, info: Info<'_>) -> Result<()> { + let info = match info { + Info::NoHint => None, + Info::Hint => self.hint.as_ref().map(String::as_str), + Info::Msg(msg) => msg, + }; + let highlighter = if self.out.colors_enabled() { + self.helper.map(|h| h as &dyn Highlighter) + } else { + None + }; let (cursor, end_pos) = self.out.refresh_line( prompt, prompt_size, &self.line, - hint, + info, self.cursor.row, self.old_rows, - self.highlighter, + highlighter, )?; self.cursor = cursor; @@ -130,18 +150,17 @@ impl<'out, 'prompt> State<'out, 'prompt> { Ok(()) } - fn hint(&mut self) -> Option { - if let Some(hinter) = self.hinter { - let hint = hinter.hint(self.line.as_str(), self.line.pos()); - self.no_hint = hint.is_none(); - hint + pub fn hint(&mut self) { + if let Some(hinter) = self.helper { + let hint = hinter.hint(self.line.as_str(), self.line.pos(), &self.ctx); + self.hint = hint; } else { - None + self.hint = None } } fn highlight_char(&mut self) -> bool { - if let Some(highlighter) = self.highlighter { + if let Some(highlighter) = self.highlighter() { let highlight_char = highlighter.highlight_char(&self.line, self.line.pos()); if highlight_char { self.highlight_char = true; @@ -159,19 +178,30 @@ impl<'out, 'prompt> State<'out, 'prompt> { } } -impl<'out, 'prompt> Refresher for State<'out, 'prompt> { +impl<'out, 'prompt, H: Helper> Refresher for State<'out, 'prompt, H> { fn refresh_line(&mut self) -> Result<()> { let prompt_size = self.prompt_size; - let hint = self.hint(); + self.hint(); + self.highlight_char(); + self.refresh(self.prompt, prompt_size, Info::Hint) + } + + fn refresh_line_with_msg(&mut self, msg: Option) -> Result<()> { + let prompt_size = self.prompt_size; + self.hint = None; self.highlight_char(); - self.refresh(self.prompt, prompt_size, hint) + self.refresh( + self.prompt, + prompt_size, + Info::Msg(msg.as_ref().map(String::as_str)), + ) } fn refresh_prompt_and_line(&mut self, prompt: &str) -> Result<()> { let prompt_size = self.out.calculate_position(prompt, Position::default()); - let hint = self.hint(); + self.hint(); self.highlight_char(); - self.refresh(prompt, prompt_size, hint) + self.refresh(prompt, prompt_size, Info::Hint) } fn doing_insert(&mut self) { @@ -191,11 +221,11 @@ impl<'out, 'prompt> Refresher for State<'out, 'prompt> { } fn has_hint(&self) -> bool { - !self.no_hint + self.hint.is_some() } } -impl<'out, 'prompt> fmt::Debug for State<'out, 'prompt> { +impl<'out, 'prompt, H: Helper> fmt::Debug for State<'out, 'prompt, H> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("State") .field("prompt", &self.prompt) @@ -204,23 +234,22 @@ impl<'out, 'prompt> fmt::Debug for State<'out, 'prompt> { .field("cursor", &self.cursor) .field("cols", &self.out.get_columns()) .field("old_rows", &self.old_rows) - .field("history_index", &self.history_index) .field("saved_line_for_history", &self.saved_line_for_history) .finish() } } -impl<'out, 'prompt> State<'out, 'prompt> { +impl<'out, 'prompt, H: Helper> State<'out, 'prompt, H> { /// Insert the character `ch` at cursor current position. pub fn edit_insert(&mut self, ch: char, n: RepeatCount) -> Result<()> { if let Some(push) = self.line.insert(ch, n) { if push { let prompt_size = self.prompt_size; - let no_previous_hint = self.no_hint; - let hint = self.hint(); + let no_previous_hint = self.hint.is_none(); + self.hint(); if n == 1 && self.cursor.col + ch.width().unwrap_or(0) < self.out.get_columns() - && (hint.is_none() && no_previous_hint) // TODO refresh only current line + && (self.hint.is_none() && no_previous_hint) // TODO refresh only current line && !self.highlight_char() { // Avoid a full update of the line in the trivial case. @@ -232,7 +261,7 @@ impl<'out, 'prompt> State<'out, 'prompt> { let bits = bits.as_bytes(); self.out.write_and_flush(bits) } else { - self.refresh(self.prompt, prompt_size, hint) + self.refresh(self.prompt, prompt_size, Info::Hint) } } else { self.refresh_line() @@ -429,27 +458,28 @@ impl<'out, 'prompt> State<'out, 'prompt> { /// Substitute the currently edited line with the next or previous history /// entry. - pub fn edit_history_next(&mut self, history: &History, prev: bool) -> Result<()> { + pub fn edit_history_next(&mut self, prev: bool) -> Result<()> { + let history = self.ctx.history; if history.is_empty() { return Ok(()); } - if self.history_index == history.len() { + if self.ctx.history_index == history.len() { if prev { // Save the current edited line before overwriting it self.backup(); } else { return Ok(()); } - } else if self.history_index == 0 && prev { + } else if self.ctx.history_index == 0 && prev { return Ok(()); } if prev { - self.history_index -= 1; + self.ctx.history_index -= 1; } else { - self.history_index += 1; + self.ctx.history_index += 1; } - if self.history_index < history.len() { - let buf = history.get(self.history_index).unwrap(); + if self.ctx.history_index < history.len() { + let buf = history.get(self.ctx.history_index).unwrap(); self.changes.borrow_mut().begin(); self.line.update(buf, buf.len()); self.changes.borrow_mut().end(); @@ -461,26 +491,27 @@ impl<'out, 'prompt> State<'out, 'prompt> { } // Non-incremental, anchored search - pub fn edit_history_search(&mut self, history: &History, dir: Direction) -> Result<()> { + pub fn edit_history_search(&mut self, dir: Direction) -> Result<()> { + let history = self.ctx.history; if history.is_empty() { return self.out.beep(); } - if self.history_index == history.len() && dir == Direction::Forward - || self.history_index == 0 && dir == Direction::Reverse + if self.ctx.history_index == history.len() && dir == Direction::Forward + || self.ctx.history_index == 0 && dir == Direction::Reverse { return self.out.beep(); } if dir == Direction::Reverse { - self.history_index -= 1; + self.ctx.history_index -= 1; } else { - self.history_index += 1; + self.ctx.history_index += 1; } if let Some(history_index) = history.starts_with( &self.line.as_str()[..self.line.pos()], - self.history_index, + self.ctx.history_index, dir, ) { - self.history_index = history_index; + self.ctx.history_index = history_index; let buf = history.get(history_index).unwrap(); self.changes.borrow_mut().begin(); self.line.update(buf, buf.len()); @@ -492,28 +523,29 @@ impl<'out, 'prompt> State<'out, 'prompt> { } /// Substitute the currently edited line with the first/last history entry. - pub fn edit_history(&mut self, history: &History, first: bool) -> Result<()> { + pub fn edit_history(&mut self, first: bool) -> Result<()> { + let history = self.ctx.history; if history.is_empty() { return Ok(()); } - if self.history_index == history.len() { + if self.ctx.history_index == history.len() { if first { // Save the current edited line before overwriting it self.backup(); } else { return Ok(()); } - } else if self.history_index == 0 && first { + } else if self.ctx.history_index == 0 && first { return Ok(()); } if first { - self.history_index = 0; - let buf = history.get(self.history_index).unwrap(); + self.ctx.history_index = 0; + let buf = history.get(self.ctx.history_index).unwrap(); self.changes.borrow_mut().begin(); self.line.update(buf, buf.len()); self.changes.borrow_mut().end(); } else { - self.history_index = history.len(); + self.ctx.history_index = history.len(); // Restore current edited line self.restore(); } @@ -522,11 +554,13 @@ impl<'out, 'prompt> State<'out, 'prompt> { } #[cfg(test)] -pub fn init_state<'out>( +pub fn init_state<'out, H: Helper>( out: &'out mut dyn Renderer, line: &str, pos: usize, -) -> State<'out, 'static> { + helper: Option<&'out H>, + history: &'out crate::history::History, +) -> State<'out, 'static, H> { State { out, prompt: "", @@ -534,13 +568,15 @@ pub fn init_state<'out>( line: LineBuffer::init(line, pos, None), cursor: Position::default(), old_rows: 0, - history_index: 0, saved_line_for_history: LineBuffer::with_capacity(100), byte_buffer: [0; 4], changes: Rc::new(RefCell::new(Changeset::new())), - hinter: None, - highlighter: None, - no_hint: true, + helper, + ctx: Context { + history, + history_index: 0, + }, + hint: Some("hint".to_owned()), highlight_char: false, } } @@ -554,38 +590,39 @@ mod test { #[test] fn edit_history_next() { let mut out = Sink::new(); - let line = "current edited line"; - let mut s = init_state(&mut out, line, 6); let mut history = History::new(); history.add("line0"); history.add("line1"); - s.history_index = history.len(); + let line = "current edited line"; + let helper: Option<()> = None; + let mut s = init_state(&mut out, line, 6, helper.as_ref(), &history); + s.ctx.history_index = history.len(); for _ in 0..2 { - s.edit_history_next(&history, false).unwrap(); + s.edit_history_next(false).unwrap(); assert_eq!(line, s.line.as_str()); } - s.edit_history_next(&history, true).unwrap(); + s.edit_history_next(true).unwrap(); assert_eq!(line, s.saved_line_for_history.as_str()); - assert_eq!(1, s.history_index); + assert_eq!(1, s.ctx.history_index); assert_eq!("line1", s.line.as_str()); for _ in 0..2 { - s.edit_history_next(&history, true).unwrap(); + s.edit_history_next(true).unwrap(); assert_eq!(line, s.saved_line_for_history.as_str()); - assert_eq!(0, s.history_index); + assert_eq!(0, s.ctx.history_index); assert_eq!("line0", s.line.as_str()); } - s.edit_history_next(&history, false).unwrap(); + s.edit_history_next(false).unwrap(); assert_eq!(line, s.saved_line_for_history.as_str()); - assert_eq!(1, s.history_index); + assert_eq!(1, s.ctx.history_index); assert_eq!("line1", s.line.as_str()); - s.edit_history_next(&history, false).unwrap(); + s.edit_history_next(false).unwrap(); // assert_eq!(line, s.saved_line_for_history); - assert_eq!(2, s.history_index); + assert_eq!(2, s.ctx.history_index); assert_eq!(line, s.line.as_str()); } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/error.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/error.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/error.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/error.rs index 4161f2f729..9f6f3f1dbe 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/error.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/error.rs @@ -11,7 +11,7 @@ use std::str; /// The error type for Rustyline errors that can arise from /// I/O related errors or Errno when using the nix-rust library // #[non_exhaustive] -#[allow(clippy::stutter)] +#[allow(clippy::module_name_repetitions)] #[derive(Debug)] pub enum ReadlineError { /// I/O Error diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/highlight.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/highlight.rs similarity index 90% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/highlight.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/highlight.rs index 96b3fdd759..53958a3d2e 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/highlight.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/highlight.rs @@ -48,14 +48,40 @@ pub trait Highlighter { /// /// Used to optimize refresh when a character is inserted or the cursor is /// moved. - fn highlight_char(&self, line: &str, _pos: usize) -> bool { - let _ = line; + fn highlight_char(&self, line: &str, pos: usize) -> bool { + let _ = (line, pos); false } } impl Highlighter for () {} +impl<'r, H: ?Sized + Highlighter> Highlighter for &'r H { + fn highlight<'l>(&self, line: &'l str, pos: usize) -> Cow<'l, str> { + (**self).highlight(line, pos) + } + + fn highlight_prompt<'p>(&self, prompt: &'p str) -> Cow<'p, str> { + (**self).highlight_prompt(prompt) + } + + fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> { + (**self).highlight_hint(hint) + } + + fn highlight_candidate<'c>( + &self, + candidate: &'c str, + completion: CompletionType, + ) -> Cow<'c, str> { + (**self).highlight_candidate(candidate, completion) + } + + fn highlight_char(&self, line: &str, pos: usize) -> bool { + (**self).highlight_char(line, pos) + } +} + static OPENS: &'static [u8; 3] = b"{[("; static CLOSES: &'static [u8; 3] = b"}])"; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/hint.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/hint.rs new file mode 100644 index 0000000000..b2265cdb80 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/hint.rs @@ -0,0 +1,68 @@ +//! Hints (suggestions at the right of the prompt as you type). + +use crate::history::Direction; +use crate::Context; + +/// Hints provider +pub trait Hinter { + /// Takes the currently edited `line` with the cursor `pos`ition and + /// returns the string that should be displayed or `None` + /// if no hint is available for the text the user currently typed. + // TODO Validate: called while editing line but not while moving cursor. + fn hint(&self, line: &str, pos: usize, ctx: &Context<'_>) -> Option { + let _ = (line, pos, ctx); + None + } +} + +impl Hinter for () {} + +impl<'r, H: ?Sized + Hinter> Hinter for &'r H { + fn hint(&self, line: &str, pos: usize, ctx: &Context<'_>) -> Option { + (**self).hint(line, pos, ctx) + } +} + +pub struct HistoryHinter {} + +impl Hinter for HistoryHinter { + fn hint(&self, line: &str, pos: usize, ctx: &Context<'_>) -> Option { + let start = if ctx.history_index() == ctx.history().len() { + ctx.history_index().saturating_sub(1) + } else { + ctx.history_index() + }; + if let Some(history_index) = + ctx.history + .starts_with(&line[..pos], start, Direction::Reverse) + { + let entry = ctx.history.get(history_index); + if let Some(entry) = entry { + if entry == line || entry == &line[..pos] { + return None; + } + } + return entry.map(|s| s[pos..].to_owned()); + } + None + } +} + +#[cfg(test)] +mod test { + use super::{Hinter, HistoryHinter}; + use crate::history::History; + use crate::Context; + + #[test] + pub fn empty_history() { + let history = History::new(); + let ctx = Context { + history: &history, + history_index: 0, + }; + let hinter = HistoryHinter {}; + let hint = hinter.hint("test", 4, &ctx); + assert_eq!(None, hint); + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/history.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/history.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/history.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/history.rs index 81e72a162d..b1cb596e6b 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/history.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/history.rs @@ -63,7 +63,7 @@ impl History { .as_ref() .chars() .next() - .map_or(true, |c| c.is_whitespace())) + .map_or(true, char::is_whitespace)) { return false; } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/keymap.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/keymap.rs similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/keymap.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/keymap.rs index 11dd5b8c6d..b9063cdd63 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/keymap.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/keymap.rs @@ -137,9 +137,7 @@ impl Cmd { let last_insert = wrt.last_insert(); if let Movement::ForwardChar(0) = mvt { Cmd::Replace( - Movement::ForwardChar( - last_insert.as_ref().map_or(0, |text| text.len()), - ), + Movement::ForwardChar(last_insert.as_ref().map_or(0, String::len)), last_insert, ) } else { @@ -290,6 +288,8 @@ pub trait Refresher { /// Rewrite the currently edited line accordingly to the buffer content, /// cursor position, and number of columns of the terminal. fn refresh_line(&mut self) -> Result<()>; + /// Same as [`refresh_line`] with a specific message instead of hint + fn refresh_line_with_msg(&mut self, msg: Option) -> Result<()>; /// Same as `refresh_line` but with a dynamic prompt. fn refresh_prompt_and_line(&mut self, prompt: &str) -> Result<()>; /// Vi only, switch to insert mode. @@ -490,7 +490,7 @@ impl InputState { KeyPress::Meta('T') | KeyPress::Meta('t') => Cmd::TransposeWords(n), KeyPress::Meta('U') | KeyPress::Meta('u') => Cmd::UpcaseWord, KeyPress::Meta('Y') | KeyPress::Meta('y') => Cmd::YankPop, - _ => self.common(key, n, positive), + _ => self.common(rdr, key, n, positive)?, }; debug!(target: "rustyline", "Emacs command: {:?}", cmd); Ok(cmd) @@ -686,7 +686,7 @@ impl InputState { Cmd::ForwardSearchHistory } KeyPress::Esc => Cmd::Noop, - _ => self.common(key, n, true), + _ => self.common(rdr, key, n, true)?, }; debug!(target: "rustyline", "Vi command: {:?}", cmd); if cmd.is_repeatable_change() { @@ -726,7 +726,7 @@ impl InputState { wrt.done_inserting(); Cmd::Move(Movement::BackwardChar(1)) } - _ => self.common(key, 1, true), + _ => self.common(rdr, key, 1, true)?, }; debug!(target: "rustyline", "Vi insert: {:?}", cmd); if cmd.is_repeatable_change() { @@ -827,8 +827,14 @@ impl InputState { }) } - fn common(&mut self, key: KeyPress, n: RepeatCount, positive: bool) -> Cmd { - match key { + fn common( + &mut self, + rdr: &mut R, + key: KeyPress, + n: RepeatCount, + positive: bool, + ) -> Result { + Ok(match key { KeyPress::Home => Cmd::Move(Movement::BeginningOfLine), KeyPress::Left => { if positive { @@ -887,8 +893,12 @@ impl InputState { KeyPress::Ctrl('Z') => Cmd::Suspend, KeyPress::Ctrl('_') => Cmd::Undo(n), KeyPress::UnknownEscSeq => Cmd::Noop, + KeyPress::BracketedPasteStart => { + let paste = rdr.read_pasted_text()?; + Cmd::Insert(1, paste) + }, _ => Cmd::Unknown, - } + }) } fn num_args(&mut self) -> i16 { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/keys.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/keys.rs similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/keys.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/keys.rs index 3ca12af66d..c3072d8ab1 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/keys.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/keys.rs @@ -6,6 +6,8 @@ pub enum KeyPress { UnknownEscSeq, Backspace, // Ctrl('H') BackTab, + BracketedPasteStart, + BracketedPasteEnd, Char(char), ControlDown, ControlLeft, diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/kill_ring.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/kill_ring.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/kill_ring.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/kill_ring.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/lib.rs similarity index 90% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/lib.rs index 0fca3eed17..4f6162bff1 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/lib.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/lib.rs @@ -17,16 +17,12 @@ //! ``` // #![feature(non_exhaustive)] -use libc; #[macro_use] extern crate log; #[cfg(unix)] extern crate nix; -#[cfg(windows)] -extern crate winapi; - pub mod completion; pub mod config; mod edit; @@ -70,16 +66,15 @@ use crate::line_buffer::WordAction; pub type Result = result::Result; /// Completes the line/word -fn complete_line( +fn complete_line( rdr: &mut R, - s: &mut State<'_, '_>, + s: &mut State<'_, '_, H>, input_state: &mut InputState, - completer: &C, - highlighter: Option<&dyn Highlighter>, config: &Config, ) -> Result> { + let completer = s.helper.unwrap(); // get a list of completions - let (start, candidates) = completer.complete(&s.line, s.line.pos())?; + let (start, candidates) = completer.complete(&s.line, s.line.pos(), &s.ctx)?; // if no completions, we are done if candidates.is_empty() { s.out.beep()?; @@ -178,7 +173,7 @@ fn complete_line( true }; if show_completions { - page_completions(rdr, s, input_state, highlighter, &candidates) + page_completions(rdr, s, input_state, &candidates) } else { s.refresh_line()?; Ok(None) @@ -189,24 +184,23 @@ fn complete_line( } /// Completes the current hint -fn complete_hint_line(s: &mut State<'_, '_>, hinter: &dyn Hinter) -> Result<()> { - let hint = match hinter.hint(&s.line, s.line.pos()) { +fn complete_hint_line(s: &mut State<'_, '_, H>) -> Result<()> { + let hint = match s.hint.as_ref() { Some(hint) => hint, None => return Ok(()), }; s.line.move_end(); - if s.line.yank(&hint, 1).is_none() { + if s.line.yank(hint, 1).is_none() { s.out.beep()?; } - s.refresh_line()?; + s.refresh_line_with_msg(None)?; Ok(()) } -fn page_completions( +fn page_completions( rdr: &mut R, - s: &mut State<'_, '_>, + s: &mut State<'_, '_, H>, input_state: &mut InputState, - highlighter: Option<&dyn Highlighter>, candidates: &[C], ) -> Result> { use std::cmp; @@ -262,7 +256,7 @@ fn page_completions( if i < candidates.len() { let candidate = &candidates[i].display(); let width = candidate.width(); - if let Some(highlighter) = highlighter { + if let Some(highlighter) = s.highlighter() { ab.push_str(&highlighter.highlight_candidate(candidate, CompletionType::List)); } else { ab.push_str(candidate); @@ -282,9 +276,9 @@ fn page_completions( } /// Incremental search -fn reverse_incremental_search( +fn reverse_incremental_search( rdr: &mut R, - s: &mut State<'_, '_>, + s: &mut State<'_, '_, H>, input_state: &mut InputState, history: &History, ) -> Result> { @@ -376,24 +370,16 @@ fn readline_edit( editor: &mut Editor, original_mode: &tty::Mode, ) -> Result { - let completer = editor.helper.as_ref(); - let hinter = editor.helper.as_ref().map(|h| h as &dyn Hinter); - let highlighter = if editor.term.colors_enabled() { - editor.helper.as_ref().map(|h| h as &dyn Highlighter) - } else { - None - }; + let helper = editor.helper.as_ref(); let mut stdout = editor.term.create_writer(); editor.reset_kill_ring(); // TODO recreate a new kill ring vs Arc> - let mut s = State::new( - &mut stdout, - prompt, - editor.history.len(), - hinter, - highlighter, - ); + let ctx = Context { + history: &editor.history, + history_index: editor.history.len(), + }; + let mut s = State::new(&mut stdout, prompt, helper, ctx); let mut input_state = InputState::new(&editor.config, Arc::clone(&editor.custom_bindings)); s.line.set_delete_listener(editor.kill_ring.clone()); @@ -417,26 +403,17 @@ fn readline_edit( } // autocomplete - if cmd == Cmd::Complete && completer.is_some() { - let next = complete_line( - &mut rdr, - &mut s, - &mut input_state, - completer.unwrap(), - highlighter, - &editor.config, - )?; - if next.is_some() { - cmd = next.unwrap(); + if cmd == Cmd::Complete && s.helper.is_some() { + let next = complete_line(&mut rdr, &mut s, &mut input_state, &editor.config)?; + if let Some(next) = next { + cmd = next; } else { continue; } } if let Cmd::CompleteHint = cmd { - if hinter.is_some() { - complete_hint_line(&mut s, hinter.unwrap())?; - } + complete_hint_line(&mut s)?; continue; } @@ -452,8 +429,8 @@ fn readline_edit( // Search history backward let next = reverse_incremental_search(&mut rdr, &mut s, &mut input_state, &editor.history)?; - if next.is_some() { - cmd = next.unwrap(); + if let Some(next) = next { + cmd = next; } else { continue; } @@ -507,18 +484,14 @@ fn readline_edit( } Cmd::NextHistory => { // Fetch the next command from the history list. - s.edit_history_next(&editor.history, false)? + s.edit_history_next(false)? } Cmd::PreviousHistory => { // Fetch the previous command from the history list. - s.edit_history_next(&editor.history, true)? - } - Cmd::HistorySearchBackward => { - s.edit_history_search(&editor.history, Direction::Reverse)? - } - Cmd::HistorySearchForward => { - s.edit_history_search(&editor.history, Direction::Forward)? + s.edit_history_next(true)? } + Cmd::HistorySearchBackward => s.edit_history_search(Direction::Reverse)?, + Cmd::HistorySearchForward => s.edit_history_search(Direction::Forward)?, Cmd::TransposeChars => { // Exchange the char before cursor with the character at cursor. s.edit_transpose_chars()? @@ -527,7 +500,7 @@ fn readline_edit( Cmd::QuotedInsert => { // Quoted insert let c = rdr.next_char()?; - s.edit_insert(c, 1)? // FIXME + s.edit_insert(c, 1)? } Cmd::Yank(n, anchor) => { // retrieve (yank) last item killed @@ -550,21 +523,20 @@ fn readline_edit( } // Accept the line regardless of where the cursor is. s.edit_move_end()?; - if s.hinter.is_some() { + if s.has_hint() { // Force a refresh without hints to leave the previous // line as the user typed it after a newline. - s.hinter = None; - s.refresh_line()?; + s.refresh_line_with_msg(None)?; } break; } Cmd::BeginningOfHistory => { // move to first entry in history - s.edit_history(&editor.history, true)? + s.edit_history(true)? } Cmd::EndOfHistory => { // move to last entry in history - s.edit_history(&editor.history, false)? + s.edit_history(false)? } Cmd::Move(Movement::BackwardWord(n, word_def)) => { // move backwards one word @@ -686,6 +658,26 @@ where impl Helper for () {} +impl<'h, H: ?Sized + Helper> Helper for &'h H {} + +/// Completion/suggestion context +pub struct Context<'h> { + history: &'h History, + history_index: usize, +} + +impl<'h> Context<'h> { + /// Return an immutable reference to the history object. + pub fn history(&self) -> &History { + &self.history + } + + /// The history index we are currently editing + pub fn history_index(&self) -> usize { + self.history_index + } +} + /// Line editor pub struct Editor { term: Terminal, @@ -705,7 +697,11 @@ impl Editor { /// Create an editor with a specific configuration. pub fn with_config(config: Config) -> Self { - let term = Terminal::new(config.color_mode(), config.output_stream()); + let term = Terminal::new( + config.color_mode(), + config.output_stream(), + config.tab_stop(), + ); Self { term, history: History::with_config(config), @@ -803,14 +799,20 @@ impl Editor { /// Bind a sequence to a command. pub fn bind_sequence(&mut self, key_seq: KeyPress, cmd: Cmd) -> Option { - let mut bindings = self.custom_bindings.write().unwrap(); - bindings.insert(key_seq, cmd) + if let Ok(mut bindings) = self.custom_bindings.write() { + bindings.insert(key_seq, cmd) + } else { + None + } } /// Remove a binding for the given sequence. pub fn unbind_sequence(&mut self, key_seq: KeyPress) -> Option { - let mut bindings = self.custom_bindings.write().unwrap(); - bindings.remove(&key_seq) + if let Ok(mut bindings) = self.custom_bindings.write() { + bindings.remove(&key_seq) + } else { + None + } } /// ``` @@ -838,6 +840,17 @@ impl Editor { let mut kill_ring = self.kill_ring.lock().unwrap(); kill_ring.reset(); } + + /// If output stream is a tty, this function returns its width and height as + /// a number of characters. + pub fn dimensions(&mut self) -> Option<(usize, usize)> { + if self.term.is_output_tty() { + let out = self.term.create_writer(); + Some((out.get_columns(), out.get_rows())) + } else { + None + } + } } impl config::Configurer for Editor { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/line_buffer.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/line_buffer.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/line_buffer.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/line_buffer.rs index 19f8b868d0..a45dfffb39 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/line_buffer.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/line_buffer.rs @@ -573,7 +573,7 @@ impl LineBuffer { self.buf[self.pos..] .grapheme_indices(true) .filter_map(|(i, ch)| { - if ch.chars().all(|c| c.is_alphanumeric()) { + if ch.chars().all(char::is_alphanumeric) { Some(i) } else { None @@ -844,16 +844,16 @@ fn is_end_of_word(word_def: Word, grapheme: &str, next: &str) -> bool { fn is_word_char(word_def: Word, grapheme: &str) -> bool { match word_def { - Word::Emacs => grapheme.chars().all(|c| c.is_alphanumeric()), + Word::Emacs => grapheme.chars().all(char::is_alphanumeric), Word::Vi => is_vi_word_char(grapheme), - Word::Big => !grapheme.chars().any(|c| c.is_whitespace()), + Word::Big => !grapheme.chars().any(char::is_whitespace), } } fn is_vi_word_char(grapheme: &str) -> bool { - grapheme.chars().all(|c| c.is_alphanumeric()) || grapheme == "_" + grapheme.chars().all(char::is_alphanumeric) || grapheme == "_" } fn is_other_char(grapheme: &str) -> bool { - !(grapheme.chars().any(|c| c.is_whitespace()) || is_vi_word_char(grapheme)) + !(grapheme.chars().any(char::is_whitespace) || is_vi_word_char(grapheme)) } #[cfg(test)] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/common.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/common.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/common.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/common.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/emacs.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/emacs.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/emacs.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/emacs.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/history.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/history.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/history.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/history.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/mod.rs similarity index 83% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/mod.rs index adc44dcfcd..375dc430e5 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/mod.rs @@ -1,13 +1,15 @@ use std::collections::HashMap; use std::sync::{Arc, RwLock}; -use super::{Editor, Result}; use crate::completion::Completer; use crate::config::{Config, EditMode}; use crate::edit::init_state; +use crate::highlight::Highlighter; +use crate::hint::Hinter; use crate::keymap::{Cmd, InputState}; use crate::keys::KeyPress; use crate::tty::Sink; +use crate::{Context, Editor, Helper, Result}; mod common; mod emacs; @@ -26,29 +28,31 @@ struct SimpleCompleter; impl Completer for SimpleCompleter { type Candidate = String; - fn complete(&self, line: &str, _pos: usize) -> Result<(usize, Vec)> { + fn complete( + &self, + line: &str, + _pos: usize, + _ctx: &Context<'_>, + ) -> Result<(usize, Vec)> { Ok((0, vec![line.to_owned() + "t"])) } } +impl Helper for SimpleCompleter {} +impl Hinter for SimpleCompleter {} +impl Highlighter for SimpleCompleter {} + #[test] fn complete_line() { let mut out = Sink::new(); - let mut s = init_state(&mut out, "rus", 3); + let history = crate::history::History::new(); + let helper = Some(SimpleCompleter); + let mut s = init_state(&mut out, "rus", 3, helper.as_ref(), &history); let config = Config::default(); let mut input_state = InputState::new(&config, Arc::new(RwLock::new(HashMap::new()))); let keys = &[KeyPress::Enter]; let mut rdr = keys.iter(); - let completer = SimpleCompleter; - let cmd = super::complete_line( - &mut rdr, - &mut s, - &mut input_state, - &completer, - None, - &Config::default(), - ) - .unwrap(); + let cmd = super::complete_line(&mut rdr, &mut s, &mut input_state, &Config::default()).unwrap(); assert_eq!(Some(Cmd::AcceptLine), cmd); assert_eq!("rust", s.line.as_str()); assert_eq!(4, s.line.pos()); diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/vi_cmd.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/vi_cmd.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/vi_cmd.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/vi_cmd.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/vi_insert.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/vi_insert.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/test/vi_insert.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/test/vi_insert.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/mod.rs similarity index 93% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/mod.rs index 6a880cb638..9adf4a3d17 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/mod.rs @@ -22,6 +22,8 @@ pub trait RawReader { /// For CTRL-V support #[cfg(unix)] fn next_char(&mut self) -> Result; + /// Bracketed paste + fn read_pasted_text(&mut self) -> Result; } #[derive(Copy, Clone, Debug, Default, PartialEq, Eq)] @@ -41,7 +43,7 @@ pub trait Renderer { prompt: &str, prompt_size: Position, line: &LineBuffer, - hint: Option, + hint: Option<&str>, current_row: usize, old_rows: usize, highlighter: Option<&dyn Highlighter>, @@ -73,6 +75,8 @@ pub trait Renderer { fn get_columns(&self) -> usize; /// Get the number of rows in the current terminal. fn get_rows(&self) -> usize; + /// Check if output supports colors. + fn colors_enabled(&self) -> bool; } impl<'a, R: Renderer + ?Sized> Renderer for &'a mut R { @@ -85,7 +89,7 @@ impl<'a, R: Renderer + ?Sized> Renderer for &'a mut R { prompt: &str, prompt_size: Position, line: &LineBuffer, - hint: Option, + hint: Option<&str>, current_row: usize, old_rows: usize, highlighter: Option<&dyn Highlighter>, @@ -132,6 +136,10 @@ impl<'a, R: Renderer + ?Sized> Renderer for &'a mut R { fn get_rows(&self) -> usize { (**self).get_rows() } + + fn colors_enabled(&self) -> bool { + (**self).colors_enabled() + } } /// Terminal contract @@ -140,14 +148,14 @@ pub trait Term { type Writer: Renderer; // rl_outstream type Mode: RawMode; - fn new(color_mode: ColorMode, stream: OutputStreamType) -> Self; + fn new(color_mode: ColorMode, stream: OutputStreamType, tab_stop: usize) -> Self; /// Check if current terminal can provide a rich line-editing user /// interface. fn is_unsupported(&self) -> bool; /// check if stdin is connected to a terminal. fn is_stdin_tty(&self) -> bool; - /// Check if output supports colors. - fn colors_enabled(&self) -> bool; + /// check if output stream is connected to a terminal. + fn is_output_tty(&self) -> bool; /// Enable RAW mode for the terminal. fn enable_raw_mode(&mut self) -> Result; /// Create a RAW reader diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/test.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/test.rs similarity index 90% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/test.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/test.rs index 7cf8345ac2..d72f336c95 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/test.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/test.rs @@ -31,6 +31,10 @@ impl<'a> RawReader for Iter<'a, KeyPress> { fn next_char(&mut self) -> Result { unimplemented!(); } + + fn read_pasted_text(&mut self) -> Result { + unimplemented!() + } } impl RawReader for IntoIter { @@ -49,6 +53,10 @@ impl RawReader for IntoIter { _ => unimplemented!(), } } + + fn read_pasted_text(&mut self) -> Result { + unimplemented!() + } } pub struct Sink {} @@ -69,7 +77,7 @@ impl Renderer for Sink { _: &str, prompt_size: Position, line: &LineBuffer, - hint: Option, + hint: Option<&str>, _: usize, _: usize, _: Option<&dyn Highlighter>, @@ -113,6 +121,10 @@ impl Renderer for Sink { fn get_rows(&self) -> usize { 24 } + + fn colors_enabled(&self) -> bool { + false + } } pub type Terminal = DummyTerminal; @@ -129,7 +141,7 @@ impl Term for DummyTerminal { type Reader = IntoIter; type Writer = Sink; - fn new(color_mode: ColorMode, _stream: OutputStreamType) -> DummyTerminal { + fn new(color_mode: ColorMode, _stream: OutputStreamType, _tab_stop: usize) -> DummyTerminal { DummyTerminal { keys: Vec::new(), cursor: 0, @@ -147,7 +159,7 @@ impl Term for DummyTerminal { true } - fn colors_enabled(&self) -> bool { + fn is_output_tty(&self) -> bool { false } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/unix.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/unix.rs similarity index 86% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/unix.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/unix.rs index eebfcfab95..be194fb0b3 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/unix.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/unix.rs @@ -27,6 +27,9 @@ const STDIN_FILENO: libc::c_int = libc::STDIN_FILENO; /// Unsupported Terminals that don't support RAW mode static UNSUPPORTED_TERM: [&'static str; 3] = ["dumb", "cons25", "emacs"]; +const BRACKETED_PASTE_ON: &[u8] = b"\x1b[?2004h"; +const BRACKETED_PASTE_OFF: &[u8] = b"\x1b[?2004l"; + impl AsRawFd for OutputStreamType { fn as_raw_fd(&self) -> RawFd { match self { @@ -72,13 +75,22 @@ fn is_a_tty(fd: libc::c_int) -> bool { unsafe { libc::isatty(fd) != 0 } } +pub struct PosixMode { + termios: termios::Termios, + out: Option, +} + #[cfg(not(test))] -pub type Mode = termios::Termios; +pub type Mode = PosixMode; -impl RawMode for termios::Termios { +impl RawMode for PosixMode { /// Disable RAW mode for the terminal. fn disable_raw_mode(&self) -> Result<()> { - termios::tcsetattr(STDIN_FILENO, SetArg::TCSADRAIN, self)?; + termios::tcsetattr(STDIN_FILENO, SetArg::TCSADRAIN, &self.termios)?; + // disable bracketed paste + if let Some(out) = self.out { + write_and_flush(out, BRACKETED_PASTE_OFF)?; + } Ok(()) } } @@ -207,6 +219,7 @@ impl PosixRawReader { } /// Handle ESC [ escape sequences + #[allow(clippy::cognitive_complexity)] fn extended_escape(&mut self, seq2: char) -> Result { let seq3 = self.next_char()?; if seq3 == '~' { @@ -256,6 +269,23 @@ impl PosixRawReader { "unsupported esc sequence: ESC [ {}{} ; {:?}", seq2, seq3, seq5); } Ok(KeyPress::UnknownEscSeq) + } else if seq4.is_digit(10) { + let seq5 = self.next_char()?; + if seq5 == '~' { + Ok(match (seq2, seq3, seq4) { + ('2', '0', '0') => KeyPress::BracketedPasteStart, + ('2', '0', '1') => KeyPress::BracketedPasteEnd, + _ => { + debug!(target: "rustyline", + "unsupported esc sequence: ESC [ {}{}{}~", seq2, seq3, seq4); + KeyPress::UnknownEscSeq + } + }) + } else { + debug!(target: "rustyline", + "unsupported esc sequence: ESC [ {}{}{} {}", seq2, seq3, seq4, seq5); + Ok(KeyPress::UnknownEscSeq) + } } else { debug!(target: "rustyline", "unsupported esc sequence: ESC [ {}{} {:?}", seq2, seq3, seq4); @@ -370,11 +400,31 @@ impl RawReader for PosixRawReader { self.parser.advance(&mut self.receiver, b); if !self.receiver.valid { return Err(error::ReadlineError::Utf8Error); - } else if self.receiver.c.is_some() { - return Ok(self.receiver.c.take().unwrap()); + } else if let Some(c) = self.receiver.c.take() { + return Ok(c); } } } + + fn read_pasted_text(&mut self) -> Result { + let mut buffer = String::new(); + loop { + match self.next_char()? { + '\x1b' => { + let key = self.escape_sequence()?; + if key == KeyPress::BracketedPasteEnd { + break; + } else { + continue; // TODO validate + } + } + c => buffer.push(c), + }; + } + let buffer = buffer.replace("\r\n", "\n"); + let buffer = buffer.replace("\r", "\n"); + Ok(buffer) + } } impl Receiver for Utf8 { @@ -396,15 +446,19 @@ pub struct PosixRenderer { out: OutputStreamType, cols: usize, // Number of columns in terminal buffer: String, + tab_stop: usize, + colors_enabled: bool, } impl PosixRenderer { - fn new(out: OutputStreamType) -> Self { + fn new(out: OutputStreamType, tab_stop: usize, colors_enabled: bool) -> Self { let (cols, _) = get_win_size(&out); Self { out, cols, buffer: String::with_capacity(1024), + tab_stop, + colors_enabled, } } } @@ -455,7 +509,7 @@ impl Renderer for PosixRenderer { prompt: &str, prompt_size: Position, line: &LineBuffer, - hint: Option, + hint: Option<&str>, current_row: usize, old_rows: usize, highlighter: Option<&dyn Highlighter>, @@ -525,17 +579,7 @@ impl Renderer for PosixRenderer { } fn write_and_flush(&self, buf: &[u8]) -> Result<()> { - match self.out { - OutputStreamType::Stdout => { - io::stdout().write_all(buf)?; - io::stdout().flush()?; - } - OutputStreamType::Stderr => { - io::stderr().write_all(buf)?; - io::stderr().flush()?; - } - } - Ok(()) + write_and_flush(self.out, buf) } /// Control characters are treated as having zero width. @@ -549,7 +593,11 @@ impl Renderer for PosixRenderer { pos.col = 0; continue; } - let cw = width(c, &mut esc_seq); + let cw = if c == "\t" { + self.tab_stop - (pos.col % self.tab_stop) + } else { + width(c, &mut esc_seq) + }; pos.col += cw; if pos.col > self.cols { pos.row += 1; @@ -589,6 +637,10 @@ impl Renderer for PosixRenderer { let (_, rows) = get_win_size(&self.out); rows } + + fn colors_enabled(&self) -> bool { + self.colors_enabled + } } static SIGWINCH_ONCE: sync::Once = sync::ONCE_INIT; @@ -620,20 +672,32 @@ pub struct PosixTerminal { stdstream_isatty: bool, pub(crate) color_mode: ColorMode, stream_type: OutputStreamType, + tab_stop: usize, +} + +impl PosixTerminal { + fn colors_enabled(&self) -> bool { + match self.color_mode { + ColorMode::Enabled => self.stdstream_isatty, + ColorMode::Forced => true, + ColorMode::Disabled => false, + } + } } impl Term for PosixTerminal { - type Mode = termios::Termios; + type Mode = PosixMode; type Reader = PosixRawReader; type Writer = PosixRenderer; - fn new(color_mode: ColorMode, stream_type: OutputStreamType) -> Self { + fn new(color_mode: ColorMode, stream_type: OutputStreamType, tab_stop: usize) -> Self { let term = Self { unsupported: is_unsupported_term(), stdin_isatty: is_a_tty(STDIN_FILENO), stdstream_isatty: is_a_tty(stream_type.as_raw_fd()), color_mode, stream_type, + tab_stop, }; if !term.unsupported && term.stdin_isatty && term.stdstream_isatty { install_sigwinch_handler(); @@ -654,13 +718,8 @@ impl Term for PosixTerminal { self.stdin_isatty } - /// Check if output supports colors. - fn colors_enabled(&self) -> bool { - match self.color_mode { - ColorMode::Enabled => self.stdstream_isatty, - ColorMode::Forced => true, - ColorMode::Disabled => false, - } + fn is_output_tty(&self) -> bool { + self.stdstream_isatty } // Interactive loop: @@ -692,7 +751,18 @@ impl Term for PosixTerminal { raw.control_chars[SpecialCharacterIndices::VMIN as usize] = 1; // One character-at-a-time input raw.control_chars[SpecialCharacterIndices::VTIME as usize] = 0; // with blocking read termios::tcsetattr(STDIN_FILENO, SetArg::TCSADRAIN, &raw)?; - Ok(original_mode) + + // enable bracketed paste + let out = if let Err(e) = write_and_flush(self.stream_type, BRACKETED_PASTE_ON) { + debug!(target: "rustyline", "Cannot enable bracketed paste: {}", e); + None + } else { + Some(self.stream_type) + }; + Ok(PosixMode { + termios: original_mode, + out, + }) } /// Create a RAW reader @@ -701,7 +771,7 @@ impl Term for PosixTerminal { } fn create_writer(&self) -> PosixRenderer { - PosixRenderer::new(self.stream_type) + PosixRenderer::new(self.stream_type, self.tab_stop, self.colors_enabled()) } } @@ -713,6 +783,20 @@ pub fn suspend() -> Result<()> { Ok(()) } +fn write_and_flush(out: OutputStreamType, buf: &[u8]) -> Result<()> { + match out { + OutputStreamType::Stdout => { + io::stdout().write_all(buf)?; + io::stdout().flush()?; + } + OutputStreamType::Stderr => { + io::stderr().write_all(buf)?; + io::stderr().flush()?; + } + } + Ok(()) +} + #[cfg(test)] mod test { use super::{Position, PosixRenderer, PosixTerminal, Renderer}; @@ -721,7 +805,7 @@ mod test { #[test] #[ignore] fn prompt_with_ansi_escape_codes() { - let out = PosixRenderer::new(OutputStreamType::Stdout); + let out = PosixRenderer::new(OutputStreamType::Stdout, 4, true); let pos = out.calculate_position("\x1b[1;32m>>\x1b[0m ", Position::default()); assert_eq!(3, pos.col); assert_eq!(0, pos.row); diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/windows.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/windows.rs similarity index 95% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/windows.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/windows.rs index ad67fa1ed2..2a44206899 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/tty/windows.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/tty/windows.rs @@ -1,7 +1,6 @@ //! Windows specific definitions use std::io::{self, Write}; use std::mem; -use std::os::windows::io::{AsRawHandle, RawHandle}; use std::sync::atomic; use unicode_width::UnicodeWidthChar; @@ -97,7 +96,7 @@ pub struct ConsoleRawReader { } impl ConsoleRawReader { - pub fn new() -> Result { + pub fn create() -> Result { let handle = get_std_handle(STDIN_FILENO)?; Ok(ConsoleRawReader { handle }) } @@ -147,7 +146,7 @@ impl RawReader for ConsoleRawReader { let utf16 = unsafe { *key_event.uChar.UnicodeChar() }; if utf16 == 0 { - match key_event.wVirtualKeyCode as i32 { + match i32::from(key_event.wVirtualKeyCode) { winuser::VK_LEFT => { return Ok(if ctrl { KeyPress::ControlLeft @@ -218,10 +217,12 @@ impl RawReader for ConsoleRawReader { } else { decode_utf16([surrogate, utf16].iter().cloned()).next() }; - if orc.is_none() { + let rc = if let Some(rc) = orc { + rc + } else { return Err(error::ReadlineError::Eof); - } - let c = orc.unwrap()?; + }; + let c = rc?; if meta { return Ok(KeyPress::Meta(c)); } else { @@ -236,6 +237,10 @@ impl RawReader for ConsoleRawReader { } } } + + fn read_pasted_text(&mut self) -> Result { + unimplemented!() + } } pub struct ConsoleRenderer { @@ -243,10 +248,11 @@ pub struct ConsoleRenderer { handle: HANDLE, cols: usize, // Number of columns in terminal buffer: String, + colors_enabled: bool, } impl ConsoleRenderer { - fn new(handle: HANDLE, out: OutputStreamType) -> ConsoleRenderer { + fn new(handle: HANDLE, out: OutputStreamType, colors_enabled: bool) -> ConsoleRenderer { // Multi line editing is enabled by ENABLE_WRAP_AT_EOL_OUTPUT mode let (cols, _) = get_win_size(handle); ConsoleRenderer { @@ -254,6 +260,7 @@ impl ConsoleRenderer { handle, cols, buffer: String::with_capacity(1024), + colors_enabled, } } @@ -302,10 +309,10 @@ impl Renderer for ConsoleRenderer { prompt: &str, prompt_size: Position, line: &LineBuffer, - hint: Option, + hint: Option<&str>, current_row: usize, old_rows: usize, - highlighter: Option<&Highlighter>, + highlighter: Option<&dyn Highlighter>, ) -> Result<(Position, Position)> { // calculate the position of the end of the input line let end_pos = self.calculate_position(line, prompt_size); @@ -424,6 +431,10 @@ impl Renderer for ConsoleRenderer { let (_, rows) = get_win_size(self.handle); rows } + + fn colors_enabled(&self) -> bool { + self.colors_enabled + } } static SIGWINCH: atomic::AtomicBool = atomic::ATOMIC_BOOL_INIT; @@ -442,14 +453,23 @@ pub struct Console { stream_type: OutputStreamType, } -impl Console {} +impl Console { + fn colors_enabled(&self) -> bool { + // TODO ANSI Colors & Windows <10 + match self.color_mode { + ColorMode::Enabled => self.stdstream_isatty && self.ansi_colors_supported, + ColorMode::Forced => true, + ColorMode::Disabled => false, + } + } +} impl Term for Console { type Mode = ConsoleMode; type Reader = ConsoleRawReader; type Writer = ConsoleRenderer; - fn new(color_mode: ColorMode, stream_type: OutputStreamType) -> Console { + fn new(color_mode: ColorMode, stream_type: OutputStreamType, _tab_stop: usize) -> Console { use std::ptr; let stdin_handle = get_std_handle(STDIN_FILENO); let stdin_isatty = match stdin_handle { @@ -493,13 +513,8 @@ impl Term for Console { self.stdin_isatty } - fn colors_enabled(&self) -> bool { - // TODO ANSI Colors & Windows <10 - match self.color_mode { - ColorMode::Enabled => self.stdstream_isatty && self.ansi_colors_supported, - ColorMode::Forced => true, - ColorMode::Disabled => false, - } + fn is_output_tty(&self) -> bool { + self.stdstream_isatty } // pub fn install_sigwinch_handler(&mut self) { @@ -550,11 +565,15 @@ impl Term for Console { } fn create_reader(&self, _: &Config) -> Result { - ConsoleRawReader::new() + ConsoleRawReader::create() } fn create_writer(&self) -> ConsoleRenderer { - ConsoleRenderer::new(self.stdstream_handle, self.stream_type) + ConsoleRenderer::new( + self.stdstream_handle, + self.stream_type, + self.colors_enabled(), + ) } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/undo.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/undo.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/undo.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/undo.rs index f04fd698aa..a3ac1bd828 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-3.0.0/src/undo.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/rustyline-4.0.0/src/undo.rs @@ -211,7 +211,7 @@ impl Changeset { fn single_char(s: &str) -> bool { let mut graphemes = s.graphemes(true); graphemes.next().map_or(false, |grapheme| { - grapheme.chars().all(|c| c.is_alphanumeric()) + grapheme.chars().all(char::is_alphanumeric) }) && graphemes.next().is_none() } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.cargo_vcs_info.json deleted file mode 100644 index 2a38d2772c..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.cargo_vcs_info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "git": { - "sha1": "5edafe24373c9884609fc2e04c0eba0770df47a8" - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/lib.rs deleted file mode 100644 index 691589d26d..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/lib.rs +++ /dev/null @@ -1,68 +0,0 @@ -//! Pure Rust implementation of Ryū, an algorithm to quickly convert floating -//! point numbers to decimal strings. -//! -//! The PLDI'18 paper [*Ryū: fast float-to-string conversion*][paper] by Ulf -//! Adams includes a complete correctness proof of the algorithm. The paper is -//! available under the creative commons CC-BY-SA license. -//! -//! This Rust implementation is a line-by-line port of Ulf Adams' implementation -//! in C, [https://github.com/ulfjack/ryu][upstream]. The [`ryu::raw`][raw] -//! module exposes exactly the API and formatting of the C implementation as -//! unsafe pure Rust functions. There is additionally a safe API as demonstrated -//! in the example code below. The safe API uses the same underlying Ryū -//! algorithm but diverges from the formatting of the C implementation to -//! produce more human-readable output, for example `0.3` rather than `3E-1`. -//! -//! [paper]: https://dl.acm.org/citation.cfm?id=3192369 -//! [upstream]: https://github.com/ulfjack/ryu -//! [raw]: raw/index.html -//! -//! # Examples -//! -//! ```rust -//! extern crate ryu; -//! -//! fn main() { -//! let mut buffer = ryu::Buffer::new(); -//! let printed = buffer.format(1.234); -//! assert_eq!(printed, "1.234"); -//! } -//! ``` - -#![no_std] -#![doc(html_root_url = "https://docs.rs/ryu/0.2.7")] -#![cfg_attr( - feature = "cargo-clippy", - allow( - cast_lossless, - cyclomatic_complexity, - many_single_char_names, - needless_pass_by_value, - unreadable_literal, - ) -)] - -#[cfg(feature = "no-panic")] -extern crate no_panic; - -mod buffer; -mod common; -mod d2s; -#[cfg(not(feature = "small"))] -mod d2s_full_table; -mod d2s_intrinsics; -#[cfg(feature = "small")] -mod d2s_small_table; -mod digit_table; -mod f2s; -mod pretty; - -pub use buffer::{Buffer, Float}; - -/// Unsafe functions that exactly mirror the API of the C implementation of Ryū. -pub mod raw { - pub use d2s::d2s_buffered_n; - pub use f2s::f2s_buffered_n; - pub use pretty::d2s_buffered_n as pretty_d2s_buffered_n; - pub use pretty::f2s_buffered_n as pretty_f2s_buffered_n; -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.cargo_vcs_info.json new file mode 100644 index 0000000000..36e4e69b1e --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "71f195de77b8689112fe63009397d2829a399995" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.gitignore b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.gitignore similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.gitignore rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.gitignore diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.travis.yml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/.travis.yml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/.travis.yml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/Cargo.toml similarity index 88% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/Cargo.toml index b9d60a6334..82070c27d3 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "ryu" -version = "0.2.7" +version = "0.2.8" authors = ["David Tolnay "] build = "build.rs" description = "Fast floating point to string conversion" @@ -20,10 +20,6 @@ documentation = "https://docs.rs/ryu" readme = "README.md" license = "Apache-2.0 OR BSL-1.0" repository = "https://github.com/dtolnay/ryu" - -[[example]] -name = "benchmark" -path = "benchmark/benchmark.rs" [dependencies.no-panic] version = "0.1" optional = true diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/Cargo.toml.orig similarity index 90% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/Cargo.toml.orig index b1167bf6c0..b3ec9c963c 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "ryu" -version = "0.2.7" +version = "0.2.8" authors = ["David Tolnay "] license = "Apache-2.0 OR BSL-1.0" description = "Fast floating point to string conversion" @@ -16,10 +16,6 @@ build = "build.rs" # one case, and only f64) at the cost of some performance. small = [] -[[example]] -name = "benchmark" -path = "benchmark/benchmark.rs" - [dependencies] no-panic = { version = "0.1", optional = true } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/LICENSE-APACHE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/LICENSE-APACHE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/LICENSE-APACHE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/LICENSE-BOOST b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/LICENSE-BOOST similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/LICENSE-BOOST rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/LICENSE-BOOST diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/README.md similarity index 63% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/README.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/README.md index 78aaedef93..1796744601 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/README.md +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/README.md @@ -24,18 +24,16 @@ example `0.3` rather than `3E-1`. uses nothing from the Rust standard library so is usable from no_std crates.* [paper]: https://dl.acm.org/citation.cfm?id=3192369 -[upstream]: https://github.com/ulfjack/ryu/tree/66ba13274ca0247ad46fd4fe8a2f6d36f5d39b01 +[upstream]: https://github.com/ulfjack/ryu/tree/795c8b57aa454c723194bbea8e4bf2ccd28e865f ```toml [dependencies] ryu = "0.2" ``` -## Examples +## Example ```rust -extern crate ryu; - fn main() { let mut buffer = ryu::Buffer::new(); let printed = buffer.format(1.234); @@ -53,12 +51,12 @@ $ cd c-ryu $ bazel run -c opt //ryu/benchmark ``` -And our benchmarks with: +And the same benchmark against our implementation with: ```console -$ git clone https://github.com/ulfjack/ryu rust-ryu +$ git clone https://github.com/dtolnay/ryu rust-ryu $ cd rust-ryu -$ cargo run --example benchmark --release +$ cargo run --example upstream_benchmark --release ``` These benchmarks measure the average time to print a 32-bit float and average @@ -69,6 +67,39 @@ The upstream C code, the unsafe direct Rust port, and the safe pretty Rust API all perform the same, taking around 21 nanoseconds to format a 32-bit float and 31 nanoseconds to format a 64-bit float. +There is also a Rust-specific benchmark comparing this implementation to the +standard library which you can run with: + +```console +$ cargo bench +``` + +The benchmark shows Ryu approximately 4-10x faster than the standard library +across a range of f32 and f64 inputs. Measurements are in nanoseconds per +iteration; smaller is better. + +| type=f32 | 0.0 | 0.1234 | 2.718281828459045 | f32::MAX | +|:--------:|:----:|:------:|:-----------------:|:--------:| +| RYU | 3ns | 28ns | 23ns | 22ns | +| STD | 40ns | 106ns | 128ns | 110ns | + +| type=f64 | 0.0 | 0.1234 | 2.718281828459045 | f64::MAX | +|:--------:|:----:|:------:|:-----------------:|:--------:| +| RYU | 3ns | 50ns | 35ns | 32ns | +| STD | 39ns | 105ns | 128ns | 202ns | + +## Formatting + +This library tends to produce more human-readable output than the standard +library's to\_string, which never uses scientific notation. Here are two +examples: + +- *ryu:* 1.23e40, *std:* 12300000000000000000000000000000000000000 +- *ryu:* 1.23e-40, *std:* 0.000000000000000000000000000000000000000123 + +Both libraries print short decimals such as 0.0000123 without scientific +notation. + ## License Licensed under either of the following at your option. diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/benches/bench.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/benches/bench.rs new file mode 100644 index 0000000000..f30f2888ac --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/benches/bench.rs @@ -0,0 +1,59 @@ +// cargo bench + +#![feature(test)] + +extern crate ryu; +extern crate test; + +macro_rules! benches { + ($($name:ident($value:expr),)*) => { + mod bench_ryu { + use test::{Bencher, black_box}; + $( + #[bench] + fn $name(b: &mut Bencher) { + use ryu; + + let mut buf = ryu::Buffer::new(); + + b.iter(move || { + let value = black_box($value); + let formatted = buf.format(value); + black_box(formatted); + }); + } + )* + } + + mod bench_std_fmt { + use test::{Bencher, black_box}; + $( + #[bench] + fn $name(b: &mut Bencher) { + use std::io::Write; + + let mut buf = Vec::with_capacity(20); + + b.iter(|| { + buf.clear(); + let value = black_box($value); + write!(&mut buf, "{}", value).unwrap(); + black_box(buf.as_slice()); + }); + } + )* + } + } +} + +benches!( + bench_0_f64(0f64), + bench_short_f64(0.1234f64), + bench_e_f64(2.718281828459045f64), + bench_max_f64(::std::f64::MAX), + + bench_0_f32(0f32), + bench_short_f32(0.1234f32), + bench_e_f32(2.718281828459045f32), + bench_max_f32(::std::f32::MAX), +); diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/build.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/build.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/build.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/build.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/benchmark/benchmark.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/examples/upstream_benchmark.rs similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/benchmark/benchmark.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/examples/upstream_benchmark.rs index f42cf237ba..f97730d6ca 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/benchmark/benchmark.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/examples/upstream_benchmark.rs @@ -1,3 +1,5 @@ +// cargo run --example upstream_benchmark --release + extern crate rand; extern crate ryu; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/buffer/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/buffer/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/buffer/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/buffer/mod.rs index 069074ce1a..ba7325f3c9 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/buffer/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/buffer/mod.rs @@ -9,7 +9,7 @@ use no_panic::no_panic; /// /// ## Example /// -/// ```rust +/// ```edition2018 /// let mut buffer = ryu::Buffer::new(); /// let printed = buffer.format(1.234); /// assert_eq!(printed, "1.234"); diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/common.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/common.rs similarity index 90% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/common.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/common.rs index 638370cf73..651c136b2b 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/common.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/common.rs @@ -22,31 +22,31 @@ use core::ptr; // Returns e == 0 ? 1 : ceil(log_2(5^e)). #[cfg_attr(feature = "no-panic", inline)] -pub fn pow5bits(e: i32) -> u32 { +pub fn pow5bits(e: i32) -> i32 { // This approximation works up to the point that the multiplication overflows at e = 3529. // If the multiplication were done in 64 bits, it would fail at 5^4004 which is just greater // than 2^9297. debug_assert!(e >= 0); debug_assert!(e <= 3528); - ((e as u32 * 1217359) >> 19) + 1 + (((e as u32 * 1217359) >> 19) + 1) as i32 } // Returns floor(log_10(2^e)). #[cfg_attr(feature = "no-panic", inline)] -pub fn log10_pow2(e: i32) -> i32 { +pub fn log10_pow2(e: i32) -> u32 { // The first value this approximation fails for is 2^1651 which is just greater than 10^297. debug_assert!(e >= 0); debug_assert!(e <= 1650); - ((e as u32 * 78913) >> 18) as i32 + (e as u32 * 78913) >> 18 } // Returns floor(log_10(5^e)). #[cfg_attr(feature = "no-panic", inline)] -pub fn log10_pow5(e: i32) -> i32 { +pub fn log10_pow5(e: i32) -> u32 { // The first value this approximation fails for is 5^2621 which is just greater than 10^1832. debug_assert!(e >= 0); debug_assert!(e <= 2620); - ((e as u32 * 732923) >> 20) as i32 + (e as u32 * 732923) >> 20 } #[cfg_attr(feature = "no-panic", inline)] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s.rs similarity index 96% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s.rs index cd61b6f16d..545c559370 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s.rs @@ -34,6 +34,7 @@ use no_panic::no_panic; pub const DOUBLE_MANTISSA_BITS: u32 = 52; pub const DOUBLE_EXPONENT_BITS: u32 = 11; +const DOUBLE_BIAS: i32 = 1023; const DOUBLE_POW5_INV_BITCOUNT: i32 = 122; const DOUBLE_POW5_BITCOUNT: i32 = 121; @@ -183,24 +184,22 @@ pub struct FloatingDecimal64 { #[cfg_attr(feature = "no-panic", inline)] pub fn d2d(ieee_mantissa: u64, ieee_exponent: u32) -> FloatingDecimal64 { - let bias = (1u32 << (DOUBLE_EXPONENT_BITS - 1)) - 1; - let (e2, m2) = if ieee_exponent == 0 { ( // We subtract 2 so that the bounds computation has 2 additional bits. - 1 - bias as i32 - DOUBLE_MANTISSA_BITS as i32 - 2, + 1 - DOUBLE_BIAS - DOUBLE_MANTISSA_BITS as i32 - 2, ieee_mantissa, ) } else { ( - ieee_exponent as i32 - bias as i32 - DOUBLE_MANTISSA_BITS as i32 - 2, + ieee_exponent as i32 - DOUBLE_BIAS - DOUBLE_MANTISSA_BITS as i32 - 2, (1u64 << DOUBLE_MANTISSA_BITS) | ieee_mantissa, ) }; let even = (m2 & 1) == 0; let accept_bounds = even; - // Step 2: Determine the interval of legal decimal representations. + // Step 2: Determine the interval of valid decimal representations. let mv = 4 * m2; // Implicit bool -> int conversion. True is 1, false is 0. let mm_shift = (ieee_mantissa != 0 || ieee_exponent <= 1) as u32; @@ -218,9 +217,9 @@ pub fn d2d(ieee_mantissa: u64, ieee_exponent: u32) -> FloatingDecimal64 { if e2 >= 0 { // I tried special-casing q == 0, but there was no effect on performance. // This expression is slightly faster than max(0, log10_pow2(e2) - 1). - let q = (log10_pow2(e2) - (e2 > 3) as i32) as u32; + let q = log10_pow2(e2) - (e2 > 3) as u32; e10 = q as i32; - let k = DOUBLE_POW5_INV_BITCOUNT + pow5bits(q as i32) as i32 - 1; + let k = DOUBLE_POW5_INV_BITCOUNT + pow5bits(q as i32) - 1; let i = -e2 + q as i32 + k; vr = mul_shift_all( m2, @@ -257,10 +256,10 @@ pub fn d2d(ieee_mantissa: u64, ieee_exponent: u32) -> FloatingDecimal64 { } } else { // This expression is slightly faster than max(0, log10_pow5(-e2) - 1). - let q = (log10_pow5(-e2) - (-e2 > 1) as i32) as u32; + let q = log10_pow5(-e2) - (-e2 > 1) as u32; e10 = q as i32 + e2; let i = -e2 - q as i32; - let k = pow5bits(i) as i32 - DOUBLE_POW5_BITCOUNT; + let k = pow5bits(i) - DOUBLE_POW5_BITCOUNT; let j = q as i32 - k; vr = mul_shift_all( m2, @@ -300,8 +299,8 @@ pub fn d2d(ieee_mantissa: u64, ieee_exponent: u32) -> FloatingDecimal64 { } } - // Step 4: Find the shortest decimal representation in the interval of legal representations. - let mut removed = 0u32; + // Step 4: Find the shortest decimal representation in the interval of valid representations. + let mut removed = 0i32; let mut last_removed_digit = 0u8; // On average, we remove ~2 digits. let output = if vm_is_trailing_zeros || vr_is_trailing_zeros { @@ -384,7 +383,7 @@ pub fn d2d(ieee_mantissa: u64, ieee_exponent: u32) -> FloatingDecimal64 { // We need to take vr + 1 if vr is outside bounds or we need to round up. vr + (vr == vm || round_up) as u64 }; - let exp = e10 + removed as i32; + let exp = e10 + removed; FloatingDecimal64 { exponent: exp, @@ -549,7 +548,7 @@ unsafe fn to_chars(v: FloatingDecimal64, sign: bool, result: *mut u8) -> usize { /// /// ## Example /// -/// ```rust +/// ```edition2018 /// let f = 1.234f64; /// /// unsafe { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s_full_table.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s_full_table.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s_full_table.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s_full_table.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s_intrinsics.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s_intrinsics.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s_intrinsics.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s_intrinsics.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s_small_table.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s_small_table.rs similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s_small_table.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s_small_table.rs index 7929e5d555..fc4a1a2a3b 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/d2s_small_table.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/d2s_small_table.rs @@ -168,9 +168,9 @@ pub unsafe fn compute_pow5(i: u32) -> (u64, u64) { let delta = pow5bits(i as i32) - pow5bits(base2 as i32); debug_assert!(base < POW5_OFFSETS.len() as u32); ( - shiftright128(low0, sum, delta) + shiftright128(low0, sum, delta as u32) + ((*POW5_OFFSETS.get_unchecked(base as usize) >> offset) & 1) as u64, - shiftright128(sum, high1, delta), + shiftright128(sum, high1, delta as u32), ) } @@ -198,9 +198,9 @@ pub unsafe fn compute_inv_pow5(i: u32) -> (u64, u64) { let delta = pow5bits(base2 as i32) - pow5bits(i as i32); debug_assert!(base < POW5_INV_OFFSETS.len() as u32); ( - shiftright128(low0, sum, delta) + shiftright128(low0, sum, delta as u32) + 1 + ((*POW5_INV_OFFSETS.get_unchecked((i / 16) as usize) >> ((i % 16) << 1)) & 3) as u64, - shiftright128(sum, high1, delta), + shiftright128(sum, high1, delta as u32), ) } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/digit_table.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/digit_table.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/digit_table.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/digit_table.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/f2s.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/f2s.rs similarity index 95% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/f2s.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/f2s.rs index 818fd1d9bc..66e7a7aa2c 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/f2s.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/f2s.rs @@ -29,6 +29,7 @@ use no_panic::no_panic; pub const FLOAT_MANTISSA_BITS: u32 = 23; pub const FLOAT_EXPONENT_BITS: u32 = 8; +const FLOAT_BIAS: i32 = 127; const FLOAT_POW5_INV_BITCOUNT: i32 = 59; const FLOAT_POW5_BITCOUNT: i32 = 61; @@ -213,24 +214,22 @@ pub struct FloatingDecimal32 { #[cfg_attr(feature = "no-panic", inline)] pub fn f2d(ieee_mantissa: u32, ieee_exponent: u32) -> FloatingDecimal32 { - let bias = (1u32 << (FLOAT_EXPONENT_BITS - 1)) - 1; - let (e2, m2) = if ieee_exponent == 0 { ( // We subtract 2 so that the bounds computation has 2 additional bits. - 1 - bias as i32 - FLOAT_MANTISSA_BITS as i32 - 2, + 1 - FLOAT_BIAS - FLOAT_MANTISSA_BITS as i32 - 2, ieee_mantissa, ) } else { ( - ieee_exponent as i32 - bias as i32 - FLOAT_MANTISSA_BITS as i32 - 2, + ieee_exponent as i32 - FLOAT_BIAS - FLOAT_MANTISSA_BITS as i32 - 2, (1u32 << FLOAT_MANTISSA_BITS) | ieee_mantissa, ) }; let even = (m2 & 1) == 0; let accept_bounds = even; - // Step 2: Determine the interval of legal decimal representations. + // Step 2: Determine the interval of valid decimal representations. let mv = 4 * m2; let mp = 4 * m2 + 2; // Implicit bool -> int conversion. True is 1, false is 0. @@ -246,9 +245,9 @@ pub fn f2d(ieee_mantissa: u32, ieee_exponent: u32) -> FloatingDecimal32 { let mut vr_is_trailing_zeros = false; let mut last_removed_digit = 0u8; if e2 >= 0 { - let q = log10_pow2(e2) as u32; + let q = log10_pow2(e2); e10 = q as i32; - let k = FLOAT_POW5_INV_BITCOUNT + pow5bits(q as i32) as i32 - 1; + let k = FLOAT_POW5_INV_BITCOUNT + pow5bits(q as i32) - 1; let i = -e2 + q as i32 + k; vr = mul_pow5_inv_div_pow2(mv, q, i); vp = mul_pow5_inv_div_pow2(mp, q, i); @@ -257,7 +256,7 @@ pub fn f2d(ieee_mantissa: u32, ieee_exponent: u32) -> FloatingDecimal32 { // We need to know one removed digit even if we are not going to loop below. We could use // q = X - 1 above, except that would require 33 bits for the result, and we've found that // 32-bit arithmetic is faster even on 64-bit machines. - let l = FLOAT_POW5_INV_BITCOUNT + pow5bits(q as i32 - 1) as i32 - 1; + let l = FLOAT_POW5_INV_BITCOUNT + pow5bits(q as i32 - 1) - 1; last_removed_digit = (mul_pow5_inv_div_pow2(mv, q - 1, -e2 + q as i32 - 1 + l) % 10) as u8; } @@ -273,16 +272,16 @@ pub fn f2d(ieee_mantissa: u32, ieee_exponent: u32) -> FloatingDecimal32 { } } } else { - let q = log10_pow5(-e2) as u32; + let q = log10_pow5(-e2); e10 = q as i32 + e2; let i = -e2 - q as i32; - let k = pow5bits(i) as i32 - FLOAT_POW5_BITCOUNT; + let k = pow5bits(i) - FLOAT_POW5_BITCOUNT; let mut j = q as i32 - k; vr = mul_pow5_div_pow2(mv, i as u32, j); vp = mul_pow5_div_pow2(mp, i as u32, j); vm = mul_pow5_div_pow2(mm, i as u32, j); if q != 0 && (vp - 1) / 10 <= vm / 10 { - j = q as i32 - 1 - (pow5bits(i + 1) as i32 - FLOAT_POW5_BITCOUNT); + j = q as i32 - 1 - (pow5bits(i + 1) - FLOAT_POW5_BITCOUNT); last_removed_digit = (mul_pow5_div_pow2(mv, (i + 1) as u32, j) % 10) as u8; } if q <= 1 { @@ -302,8 +301,8 @@ pub fn f2d(ieee_mantissa: u32, ieee_exponent: u32) -> FloatingDecimal32 { } } - // Step 4: Find the shortest decimal representation in the interval of legal representations. - let mut removed = 0u32; + // Step 4: Find the shortest decimal representation in the interval of valid representations. + let mut removed = 0i32; let output = if vm_is_trailing_zeros || vr_is_trailing_zeros { // General case, which happens rarely (~4.0%). while vp / 10 > vm / 10 { @@ -346,7 +345,7 @@ pub fn f2d(ieee_mantissa: u32, ieee_exponent: u32) -> FloatingDecimal32 { // We need to take vr + 1 if vr is outside bounds or we need to round up. vr + (vr == vm || last_removed_digit >= 5) as u32 }; - let exp = e10 + removed as i32; + let exp = e10 + removed; FloatingDecimal32 { exponent: exp, @@ -461,7 +460,7 @@ unsafe fn to_chars(v: FloatingDecimal32, sign: bool, result: *mut u8) -> usize { /// /// ## Example /// -/// ```rust +/// ```edition2018 /// let f = 1.234f32; /// /// unsafe { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/lib.rs new file mode 100644 index 0000000000..332a2e557d --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/lib.rs @@ -0,0 +1,126 @@ +//! Pure Rust implementation of Ryū, an algorithm to quickly convert floating +//! point numbers to decimal strings. +//! +//! The PLDI'18 paper [*Ryū: fast float-to-string conversion*][paper] by Ulf +//! Adams includes a complete correctness proof of the algorithm. The paper is +//! available under the creative commons CC-BY-SA license. +//! +//! This Rust implementation is a line-by-line port of Ulf Adams' implementation +//! in C, [https://github.com/ulfjack/ryu][upstream]. The [`ryu::raw`][raw] +//! module exposes exactly the API and formatting of the C implementation as +//! unsafe pure Rust functions. There is additionally a safe API as demonstrated +//! in the example code below. The safe API uses the same underlying Ryū +//! algorithm but diverges from the formatting of the C implementation to +//! produce more human-readable output, for example `0.3` rather than `3E-1`. +//! +//! [paper]: https://dl.acm.org/citation.cfm?id=3192369 +//! [upstream]: https://github.com/ulfjack/ryu +//! [raw]: raw/index.html +//! +//! # Example +//! +//! ```edition2018 +//! fn main() { +//! let mut buffer = ryu::Buffer::new(); +//! let printed = buffer.format(1.234); +//! assert_eq!(printed, "1.234"); +//! } +//! ``` +//! +//! ## Performance +//! +//! You can run upstream's benchmarks with: +//! +//! ```console +//! $ git clone https://github.com/ulfjack/ryu c-ryu +//! $ cd c-ryu +//! $ bazel run -c opt //ryu/benchmark +//! ``` +//! +//! And the same benchmark against our implementation with: +//! +//! ```console +//! $ git clone https://github.com/dtolnay/ryu rust-ryu +//! $ cd rust-ryu +//! $ cargo run --example upstream_benchmark --release +//! ``` +//! +//! These benchmarks measure the average time to print a 32-bit float and average +//! time to print a 64-bit float, where the inputs are distributed as uniform random +//! bit patterns 32 and 64 bits wide. +//! +//! The upstream C code, the unsafe direct Rust port, and the safe pretty Rust API +//! all perform the same, taking around 21 nanoseconds to format a 32-bit float and +//! 31 nanoseconds to format a 64-bit float. +//! +//! There is also a Rust-specific benchmark comparing this implementation to the +//! standard library which you can run with: +//! +//! ```console +//! $ cargo bench +//! ``` +//! +//! The benchmark shows Ryu approximately 4-10x faster than the standard library +//! across a range of f32 and f64 inputs. Measurements are in nanoseconds per +//! iteration; smaller is better. +//! +//! | type=f32 | 0.0 | 0.1234 | 2.718281828459045 | f32::MAX | +//! |:--------:|:----:|:------:|:-----------------:|:--------:| +//! | RYU | 3ns | 28ns | 23ns | 22ns | +//! | STD | 40ns | 106ns | 128ns | 110ns | +//! +//! | type=f64 | 0.0 | 0.1234 | 2.718281828459045 | f64::MAX | +//! |:--------:|:----:|:------:|:-----------------:|:--------:| +//! | RYU | 3ns | 50ns | 35ns | 32ns | +//! | STD | 39ns | 105ns | 128ns | 202ns | +//! +//! ## Formatting +//! +//! This library tends to produce more human-readable output than the standard +//! library's to\_string, which never uses scientific notation. Here are two +//! examples: +//! +//! - *ryu:* 1.23e40, *std:* 12300000000000000000000000000000000000000 +//! - *ryu:* 1.23e-40, *std:* 0.000000000000000000000000000000000000000123 +//! +//! Both libraries print short decimals such as 0.0000123 without scientific +//! notation. + +#![no_std] +#![doc(html_root_url = "https://docs.rs/ryu/0.2.8")] +#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))] +#![cfg_attr( + feature = "cargo-clippy", + allow( + cast_lossless, + cyclomatic_complexity, + many_single_char_names, + needless_pass_by_value, + unreadable_literal, + ) +)] + +#[cfg(feature = "no-panic")] +extern crate no_panic; + +mod buffer; +mod common; +mod d2s; +#[cfg(not(feature = "small"))] +mod d2s_full_table; +mod d2s_intrinsics; +#[cfg(feature = "small")] +mod d2s_small_table; +mod digit_table; +mod f2s; +mod pretty; + +pub use buffer::{Buffer, Float}; + +/// Unsafe functions that exactly mirror the API of the C implementation of Ryū. +pub mod raw { + pub use d2s::d2s_buffered_n; + pub use f2s::f2s_buffered_n; + pub use pretty::d2s_buffered_n as pretty_d2s_buffered_n; + pub use pretty::f2s_buffered_n as pretty_f2s_buffered_n; +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/pretty/exponent.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/pretty/exponent.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/pretty/exponent.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/pretty/exponent.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/pretty/mantissa.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/pretty/mantissa.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/pretty/mantissa.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/pretty/mantissa.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/pretty/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/pretty/mod.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/pretty/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/pretty/mod.rs index 6b8095cbb9..e5f72c6a31 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/src/pretty/mod.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/src/pretty/mod.rs @@ -38,7 +38,7 @@ use no_panic::no_panic; /// /// ## Example /// -/// ```rust +/// ```edition2018 /// let f = 1.234f64; /// /// unsafe { @@ -143,7 +143,7 @@ pub unsafe fn d2s_buffered_n(f: f64, result: *mut u8) -> usize { /// /// ## Example /// -/// ```rust +/// ```edition2018 /// let f = 1.234f32; /// /// unsafe { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/d2s_table_test.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/d2s_table_test.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/d2s_table_test.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/d2s_table_test.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/d2s_test.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/d2s_test.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/d2s_test.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/d2s_test.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/exhaustive.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/exhaustive.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/exhaustive.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/exhaustive.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/f2s_test.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/f2s_test.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/f2s_test.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/f2s_test.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/macros/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/macros/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.7/tests/macros/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/ryu-0.2.8/tests/macros/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/.cargo_vcs_info.json deleted file mode 100644 index 7f31c297b2..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/.cargo_vcs_info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "git": { - "sha1": "0be7f36d51164bb50b1f4dae452cc569030828e9" - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/.cargo_vcs_info.json new file mode 100644 index 0000000000..57af61b2b4 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "5cc3902ab95a2af9e17bbda1656b702fa19f442a" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/Cargo.toml similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/Cargo.toml index ca0ece5966..612294d69d 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "serde" -version = "1.0.90" +version = "1.0.91" authors = ["Erick Tryzelaar ", "David Tolnay "] build = "build.rs" include = ["Cargo.toml", "build.rs", "src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/Cargo.toml.orig similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/Cargo.toml.orig index b5c2e145f7..b244792fef 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "serde" -version = "1.0.90" # remember to update html_root_url +version = "1.0.91" # remember to update html_root_url authors = ["Erick Tryzelaar ", "David Tolnay "] license = "MIT/Apache-2.0" description = "A generic serialization/deserialization framework" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/LICENSE-APACHE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/LICENSE-APACHE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/LICENSE-APACHE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/LICENSE-MIT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/LICENSE-MIT similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/LICENSE-MIT rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/LICENSE-MIT diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/README.md similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/README.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/README.md diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/build.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/build.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/build.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/build.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/crates-io.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/crates-io.md similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/crates-io.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/crates-io.md diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/from_primitive.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/from_primitive.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/from_primitive.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/from_primitive.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/ignored_any.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/ignored_any.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/ignored_any.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/ignored_any.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/impls.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/impls.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/impls.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/impls.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/utf8.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/utf8.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/utf8.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/utf8.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/value.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/value.rs similarity index 92% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/value.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/value.rs index 3a5229696a..d0a185da2e 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/de/value.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/de/value.rs @@ -1287,10 +1287,40 @@ where visitor.visit_map(self.map) } + fn deserialize_enum( + self, + _name: &str, + _variants: &'static [&'static str], + visitor: V, + ) -> Result + where + V: de::Visitor<'de>, + { + visitor.visit_enum(self) + } + forward_to_deserialize_any! { bool i8 i16 i32 i64 i128 u8 u16 u32 u64 u128 f32 f64 char str string bytes byte_buf option unit unit_struct newtype_struct seq tuple - tuple_struct map struct enum identifier ignored_any + tuple_struct map struct identifier ignored_any + } +} + +impl<'de, A> de::EnumAccess<'de> for MapAccessDeserializer +where + A: de::MapAccess<'de>, +{ + type Error = A::Error; + type Variant = private::MapAsEnum; + + fn variant_seed(mut self, seed: T) -> Result<(T::Value, Self::Variant), Self::Error> + where + T: de::DeserializeSeed<'de>, + { + match self.map.next_key_seed(seed)? { + Some(key) => Ok((key, private::map_as_enum(self.map))), + None => Err(de::Error::invalid_type(de::Unexpected::Map, &"enum")), + } } } @@ -1299,7 +1329,7 @@ where mod private { use lib::*; - use de::{self, Unexpected}; + use de::{self, DeserializeSeed, Deserializer, MapAccess, Unexpected, VariantAccess, Visitor}; #[derive(Clone, Debug)] pub struct UnitOnly { @@ -1360,6 +1390,92 @@ mod private { } } + #[derive(Clone, Debug)] + pub struct MapAsEnum { + map: A, + } + + pub fn map_as_enum(map: A) -> MapAsEnum { + MapAsEnum { map: map } + } + + impl<'de, A> VariantAccess<'de> for MapAsEnum + where + A: MapAccess<'de>, + { + type Error = A::Error; + + fn unit_variant(mut self) -> Result<(), Self::Error> { + self.map.next_value() + } + + fn newtype_variant_seed(mut self, seed: T) -> Result + where + T: DeserializeSeed<'de>, + { + self.map.next_value_seed(seed) + } + + fn tuple_variant(mut self, len: usize, visitor: V) -> Result + where + V: Visitor<'de>, + { + self.map.next_value_seed(SeedTupleVariant { + len: len, + visitor: visitor, + }) + } + + fn struct_variant( + mut self, + _fields: &'static [&'static str], + visitor: V, + ) -> Result + where + V: Visitor<'de>, + { + self.map + .next_value_seed(SeedStructVariant { visitor: visitor }) + } + } + + struct SeedTupleVariant { + len: usize, + visitor: V, + } + + impl<'de, V> DeserializeSeed<'de> for SeedTupleVariant + where + V: Visitor<'de>, + { + type Value = V::Value; + + fn deserialize(self, deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_tuple(self.len, self.visitor) + } + } + + struct SeedStructVariant { + visitor: V, + } + + impl<'de, V> DeserializeSeed<'de> for SeedStructVariant + where + V: Visitor<'de>, + { + type Value = V::Value; + + fn deserialize(self, deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_map(self.visitor) + } + } + /// Avoid having to restate the generic types on `MapDeserializer`. The /// `Iterator::Item` contains enough information to figure out K and V. pub trait Pair { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/export.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/export.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/export.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/export.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/integer128.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/integer128.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/integer128.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/integer128.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/lib.rs similarity index 98% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/lib.rs index ce33caa39c..021ae9b5a7 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/lib.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/lib.rs @@ -46,7 +46,6 @@ //! - [BSON], the data storage and network transfer format used by MongoDB. //! - [Avro], a binary format used within Apache Hadoop, with support for schema //! definition. -//! - [Hjson], a variant of JSON designed to be readable and writable by humans. //! - [JSON5], A superset of JSON including some productions from ES5. //! - [URL], the x-www-form-urlencoded format. //! - [Envy], a way to deserialize environment variables into Rust structs. @@ -64,7 +63,6 @@ //! [RON]: https://github.com/ron-rs/ron //! [BSON]: https://github.com/zonyitoo/bson-rs //! [Avro]: https://github.com/flavray/avro-rs -//! [Hjson]: https://github.com/laktak/hjson-rust //! [JSON5]: https://github.com/callum-oakley/json5-rs //! [URL]: https://github.com/nox/serde_urlencoded //! [Envy]: https://github.com/softprops/envy @@ -75,7 +73,7 @@ //////////////////////////////////////////////////////////////////////////////// // Serde types in rustdoc of other crates get linked to here. -#![doc(html_root_url = "https://docs.rs/serde/1.0.90")] +#![doc(html_root_url = "https://docs.rs/serde/1.0.91")] // Support using Serde without the standard library! #![cfg_attr(not(feature = "std"), no_std)] // Unstable functionality only if the user asks for it. For tracking and diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/macros.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/macros.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/macros.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/macros.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/private/de.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/private/de.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/private/de.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/private/de.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/private/macros.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/private/macros.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/private/macros.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/private/macros.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/private/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/private/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/private/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/private/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/private/ser.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/private/ser.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/private/ser.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/private/ser.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/ser/impls.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/ser/impls.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/ser/impls.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/ser/impls.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/ser/impossible.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/ser/impossible.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/ser/impossible.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/ser/impossible.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/ser/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/ser/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.90/src/ser/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/serde-1.0.91/src/ser/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.cargo_vcs_info.json deleted file mode 100644 index ed8bfcdaa3..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.cargo_vcs_info.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "git": { - "sha1": "79af142fab97e9435e0f851004300b1bcfb65872" - } -} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.travis.yml deleted file mode 100644 index a19d15c692..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: rust -cache: cargo -rust: - - stable - - beta - - nightly -os: - - linux - - osx - -before_script: - - | - (travis_wait rustup component add rustfmt-preview || true) && - (test "$TRAVIS_RUST_VERSION" != nightly || travis_wait rustup component add clippy-preview || true) - -script: - - | - export PATH="$PATH":~/.cargo/bin && - export RUST_BACKTRACE=1 && - export CARGO_INCREMENTAL=1 && - cargo build && - cargo test && - cargo doc --no-deps && - (test "$TRAVIS_RUST_VERSION" != nightly || cargo clippy -- --deny clippy) && - (test "$TRAVIS_RUST_VERSION" != nightly || cargo fmt) - -matrix: - allow_failures: - - rust: nightly diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.cargo_vcs_info.json new file mode 100644 index 0000000000..23aa020a19 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "50e0564e0ec3271bcfc06d6e7291b5d350d1eead" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.gitignore b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.gitignore similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/.gitignore rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.gitignore diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.travis.yml new file mode 100644 index 0000000000..254d540ccc --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/.travis.yml @@ -0,0 +1,32 @@ +language: rust +cache: cargo +rust: + - 1.26.0 + - stable + - beta + - nightly +os: + - linux + - osx + +before_script: + - | + (travis_wait rustup component add rustfmt-preview || true) && + (test "$TRAVIS_RUST_VERSION" == 1.26.0 || travis_wait rustup component add clippy-preview || true) + +script: + - | + export PATH="$PATH":~/.cargo/bin && + export RUST_BACKTRACE=1 && + export CARGO_INCREMENTAL=1 && + cargo build --all && + cargo build --all --all-features && + (test "$TRAVIS_RUST_VERSION" == 1.26.0 || cargo test --all) && + (test "$TRAVIS_RUST_VERSION" == 1.26.0 || cargo test --all --all-features) && + cargo doc --no-deps && + (test "$TRAVIS_RUST_VERSION" == 1.26.0 || cargo clippy -- --deny clippy::all) && + (test "$TRAVIS_RUST_VERSION" == 1.26.0 || cargo fmt) + +matrix: + allow_failures: + - rust: nightly diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/CHANGELOG.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/CHANGELOG.md similarity index 80% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/CHANGELOG.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/CHANGELOG.md index a0d920b1be..118d4c24e6 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/CHANGELOG.md +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/CHANGELOG.md @@ -1,3 +1,10 @@ +# 0.1.9 +# registry-1.0.0 + +* Split into backend signal-hook-registry and the frontend. The backend is much + less likely to have breaking changes so it contains the things that can be in + the application just once. + # 0.1.8 * The `Signals` iterator can now be closed (from another instance or thread), diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/Cargo.toml similarity index 94% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/Cargo.toml index 66f6862c96..c6e1aad526 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "signal-hook" -version = "0.1.8" +version = "0.1.9" authors = ["Michal 'vorner' Vaner "] description = "Unix signal handling" documentation = "https://docs.rs/signal-hook" @@ -22,9 +22,6 @@ license = "Apache-2.0/MIT" repository = "https://github.com/vorner/signal-hook" [package.metadata.docs.rs] features = ["mio-support", "tokio-support"] -[dependencies.arc-swap] -version = "~0.3.5" - [dependencies.futures] version = "~0.1" optional = true @@ -40,6 +37,9 @@ optional = true version = "~0.6" optional = true +[dependencies.signal-hook-registry] +version = "~1" + [dependencies.tokio-reactor] version = "~0.1" optional = true @@ -47,7 +47,7 @@ optional = true version = "~0.1" [dev-dependencies.version-sync] -version = "~0.5" +version = "~0.8" [features] mio-support = ["mio", "mio-uds"] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/Cargo.toml.orig similarity index 82% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/Cargo.toml.orig index 2b1de61b64..cdd11ae40b 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "signal-hook" -version = "0.1.8" +version = "0.1.9" authors = ["Michal 'vorner' Vaner "] description = "Unix signal handling" documentation = "https://docs.rs/signal-hook" @@ -17,16 +17,22 @@ maintenance = { status = "actively-developed" } mio-support = ["mio", "mio-uds"] tokio-support = ["futures", "mio-support", "tokio-reactor"] +[workspace] +members = [ + "./", + "signal-hook-registry", +] + [dependencies] -arc-swap = "~0.3.5" libc = "~0.2" futures = { version = "~0.1", optional = true } mio = { version = "~0.6", optional = true } mio-uds = { version = "~0.6", optional = true } +signal-hook-registry = { version = "~1", path = "signal-hook-registry" } tokio-reactor = { version = "~0.1", optional = true } [dev-dependencies] -version-sync = "~0.5" +version-sync = "~0.8" tokio = "~0.1" [package.metadata.docs.rs] diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/LICENSE-APACHE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/LICENSE-APACHE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/LICENSE-APACHE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/LICENSE-MIT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/LICENSE-MIT similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/LICENSE-MIT rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/LICENSE-MIT diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/README.md similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/README.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/README.md diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/rustfmt.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/rustfmt.toml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/rustfmt.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/rustfmt.toml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/flag.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/flag.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/flag.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/flag.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/iterator.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/iterator.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/iterator.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/iterator.rs index 8d1eb02036..99556bee64 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/iterator.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/iterator.rs @@ -608,7 +608,7 @@ mod tokio_support { /// } /// ``` pub fn into_async(self) -> Result { - Async::new(self, &Handle::current()) + Async::new(self, &Handle::default()) } /// Turns the iterator into a stream, tied into a specific tokio reactor. diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/lib.rs new file mode 100644 index 0000000000..e4e601fe6f --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/lib.rs @@ -0,0 +1,141 @@ +#![doc( + html_root_url = "https://docs.rs/signal-hook/0.1.9/signal-hook/", + test(attr(deny(warnings))) +)] +#![deny(missing_docs)] + +//! Library for easier and safe Unix signal handling +//! +//! Unix signals are inherently hard to handle correctly, for several reasons: +//! +//! * They are a global resource. If a library wants to set its own signal handlers, it risks +//! disturbing some other library. It is possible to chain the previous signal handler, but then +//! it is impossible to remove the old signal handlers from the chains in any practical manner. +//! * They can be called from whatever thread, requiring synchronization. Also, as they can +//! interrupt a thread at any time, making most handling race-prone. +//! * According to the POSIX standard, the set of functions one may call inside a signal handler is +//! limited to very few of them. To highlight, mutexes (or other locking mechanisms) and memory +//! allocation and deallocation is *not* allowed. +//! +//! This library aims to solve some of the problems. It provides a global registry of actions +//! performed on arrival of signals. It is possible to register multiple actions for the same +//! signal and it is possible to remove the actions later on. If there was a previous signal +//! handler when the first action for a signal is registered, it is chained (but the original one +//! can't be removed). +//! +//! The main function of the library is [`register`](fn.register.html). +//! +//! It also offers several common actions one might want to register, implemented in the correct +//! way. They are scattered through submodules and have the same limitations and characteristics as +//! the [`register`](fn.register.html) function. Generally, they work to postpone the action taken +//! outside of the signal handler, where the full freedom and power of rust is available. +//! +//! Unlike other Rust libraries for signal handling, this should be flexible enough to handle all +//! the common and useful patterns. +//! +//! The library avoids all the newer fancy signal-handling routines. These generally have two +//! downsides: +//! +//! * They are not fully portable, therefore the library would have to contain *both* the +//! implementation using the basic routines and the fancy ones. As signal handling is not on the +//! hot path of most programs, this would not bring any actual benefit. +//! * The other routines require that the given signal is masked in all application's threads. As +//! the signals are not masked by default and a new thread inherits the signal mask of its +//! parent, it is possible to guarantee such global mask by masking them before any threads +//! start. While this is possible for an application developer to do, it is not possible for a +//! a library. +//! +//! # Warning +//! +//! Even with this library, you should thread with care. It does not eliminate all the problems +//! mentioned above. +//! +//! Also, note that the OS may collate multiple instances of the same signal into just one call of +//! the signal handler. Furthermore, some abstractions implemented here also naturally collate +//! multiple instances of the same signal. The general guarantee is, if there was at least one +//! signal of the given number delivered, an action will be taken, but it is not specified how many +//! times ‒ signals work mostly as kind of „wake up now“ nudge, if the application is slow to wake +//! up, it may be nudged multiple times before it does so. +//! +//! # Signal limitations +//! +//! OS limits still apply ‒ it is not possible to redefine certain signals (eg. `SIGKILL` or +//! `SIGSTOP`) and it is probably a *very* stupid idea to touch certain other ones (`SIGSEGV`, +//! `SIGFPE`, `SIGILL`). Therefore, this library will panic if any attempt at manipulating these is +//! made. There are some use cases for redefining the latter ones, but these are not well served by +//! this library and you really *really* have to know what you're doing and are generally on your +//! own doing that. +//! +//! # Signal masks +//! +//! As the library uses `sigaction` under the hood, signal masking works as expected (eg. with +//! `pthread_sigmask`). This means, signals will *not* be delivered if the signal is masked in all +//! program's threads. +//! +//! By the way, if you do want to modify the signal mask (or do other Unix-specific magic), the +//! [nix](https://crates.io/crates/nix) crate offers safe interface to many low-level functions, +//! including +//! [`pthread_sigmask`](https://docs.rs/nix/0.11.0/nix/sys/signal/fn.pthread_sigmask.html). +//! +//! # Portability +//! +//! It should work on any POSIX.1-2001 system, which are all the major big OSes with the notable +//! exception of Windows. +//! +//! Windows has some limited support for signals, patches to include support in this library are +//! welcome. +//! +//! # Examples +//! +//! ```rust +//! extern crate signal_hook; +//! +//! use std::io::Error; +//! use std::sync::Arc; +//! use std::sync::atomic::{AtomicBool, Ordering}; +//! +//! fn main() -> Result<(), Error> { +//! let term = Arc::new(AtomicBool::new(false)); +//! signal_hook::flag::register(signal_hook::SIGTERM, Arc::clone(&term))?; +//! while !term.load(Ordering::Relaxed) { +//! // Do some time-limited stuff here +//! // (if this could block forever, then there's no guarantee the signal will have any +//! // effect). +//! # +//! # // Hack to terminate the example, not part of the real code. +//! # term.store(true, Ordering::Relaxed); +//! } +//! Ok(()) +//! } +//! ``` +//! +//! # Features +//! +//! * `mio-support`: The [`Signals` iterator](iterator/struct.Signals.html) becomes pluggable into +//! mio. +//! * `tokio-support`: The [`Signals`](iterator/struct.Signals.html) can be turned into +//! [`Async`](iterator/struct.Async.html), which provides a `Stream` interface for integration in +//! the asynchronous world. + +#[cfg(feature = "tokio-support")] +extern crate futures; +extern crate libc; +#[cfg(feature = "mio-support")] +extern crate mio; +#[cfg(feature = "mio-support")] +extern crate mio_uds; +extern crate signal_hook_registry; +#[cfg(feature = "tokio-support")] +extern crate tokio_reactor; + +pub mod flag; +pub mod iterator; +pub mod pipe; + +pub use libc::{ + SIGABRT, SIGALRM, SIGBUS, SIGCHLD, SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGIO, SIGKILL, + SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGSTOP, SIGSYS, SIGTERM, SIGTRAP, SIGUSR1, SIGUSR2, + SIGWINCH, +}; + +pub use signal_hook_registry::{register, unregister, SigId, FORBIDDEN}; diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/pipe.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/pipe.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/pipe.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/src/pipe.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/tests/iterator.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/tests/iterator.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/tests/iterator.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/tests/iterator.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/tests/tokio.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/tests/tokio.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/tests/tokio.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/tests/tokio.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/tests/version.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/tests/version.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/tests/version.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.9/tests/version.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/.cargo-ok similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.cargo-ok rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/.cargo-ok diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/.cargo_vcs_info.json new file mode 100644 index 0000000000..8ed474bc8f --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "315778cec4d6d5bc424c969dd82f95b03a819289" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/Cargo.toml new file mode 100644 index 0000000000..dc37aece50 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/Cargo.toml @@ -0,0 +1,37 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies +# +# If you believe there's an error in this file please file an +# issue against the rust-lang/cargo repository. If you're +# editing this file be aware that the upstream Cargo.toml +# will likely look very different (and much more reasonable) + +[package] +name = "signal-hook-registry" +version = "1.0.1" +authors = ["Michal 'vorner' Vaner "] +description = "Backend crate for signal-hook" +documentation = "https://docs.rs/signal-hook-registry" +readme = "README.md" +keywords = ["signal", "unix", "daemon"] +license = "Apache-2.0/MIT" +repository = "https://github.com/vorner/signal-hook" +[dependencies.arc-swap] +version = "~0.3.5" + +[dependencies.libc] +version = "~0.2" +[dev-dependencies.signal-hook] +version = "~0.1" + +[dev-dependencies.version-sync] +version = "~0.8" +[badges.maintenance] +status = "actively-developed" + +[badges.travis-ci] +repository = "vorner/signal-hook" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/Cargo.toml.orig new file mode 100644 index 0000000000..209ce1bf78 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/Cargo.toml.orig @@ -0,0 +1,22 @@ +[package] +name = "signal-hook-registry" +version = "1.0.1" +authors = ["Michal 'vorner' Vaner "] +description = "Backend crate for signal-hook" +documentation = "https://docs.rs/signal-hook-registry" +readme = "README.md" +repository = "https://github.com/vorner/signal-hook" +keywords = ["signal", "unix", "daemon"] +license = "Apache-2.0/MIT" + +[badges] +travis-ci = { repository = "vorner/signal-hook" } +maintenance = { status = "actively-developed" } + +[dependencies] +arc-swap = "~0.3.5" +libc = "~0.2" + +[dev-dependencies] +version-sync = "~0.8" +signal-hook = { version = "~0.1", path = ".." } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/LICENSE-APACHE similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/LICENSE-APACHE rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/LICENSE-APACHE diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/LICENSE-MIT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/LICENSE-MIT new file mode 100644 index 0000000000..ebe0bc91ea --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/LICENSE-MIT @@ -0,0 +1,25 @@ +Copyright (c) 2017 tokio-jsonrpc developers + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/README.md new file mode 100644 index 0000000000..eb4773328f --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/README.md @@ -0,0 +1,24 @@ +# Signal-hook-registry + +[![Travis Build Status](https://api.travis-ci.org/vorner/signal-hook.svg?branch=master)](https://travis-ci.org/vorner/signal-hook) + +This is the backend crate for the +[signal-hook](https://crates.io/crates/signal-hook) crate. The general direct use of +this crate is discouraged. See the +[documentation](https://docs.rs/signal-hook-registry) for further details. + +## License + +Licensed under either of + + * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) + * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally +submitted for inclusion in the work by you, as defined in the Apache-2.0 +license, shall be dual licensed as above, without any additional terms +or conditions. diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/src/lib.rs similarity index 67% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/src/lib.rs index fd75507f04..3945668709 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-0.1.8/src/lib.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/src/lib.rs @@ -1,145 +1,51 @@ #![doc( - html_root_url = "https://docs.rs/signal-hook/0.1.8/signal-hook/", + html_root_url = "https://docs.rs/signal-hook-registry/1.0.1/signal-hook-registry/", test(attr(deny(warnings))) )] #![deny(missing_docs)] -//! Library for easier and safe Unix signal handling +//! Backend of the [signal-hook] crate. //! -//! Unix signals are inherently hard to handle correctly, for several reasons: +//! The [signal-hook] crate tries to provide an API to the unix signals, which are a global +//! resource. Therefore, it is desirable an application contains just one version of the crate +//! which manages this global resource. But that makes it impossible to make breaking changes in +//! the API. //! -//! * They are a global resource. If a library wants to set its own signal handlers, it risks -//! disturbing some other library. It is possible to chain the previous signal handler, but then -//! it is impossible to remove the old signal handlers from the chains in any practical manner. -//! * They can be called from whatever thread, requiring synchronization. Also, as they can -//! interrupt a thread at any time, making most handling race-prone. -//! * According to the POSIX standard, the set of functions one may call inside a signal handler is -//! limited to very few of them. To highlight, mutexes (or other locking mechanisms) and memory -//! allocation and deallocation is *not* allowed. +//! Therefore, this crate provides very minimal and low level API to the signals that is unlikely +//! to have to change, while there may be multiple versions of the [signal-hook] that all use this +//! low-level API to provide different versions of the high level APIs. //! -//! This library aims to solve some of the problems. It provides a global registry of actions -//! performed on arrival of signals. It is possible to register multiple actions for the same -//! signal and it is possible to remove the actions later on. If there was a previous signal -//! handler when the first action for a signal is registered, it is chained (but the original one -//! can't be removed). +//! It is also possible some other crates might want to build a completely different API. This +//! split allows these crates to still reuse the same low-level routines in this crate instead of +//! going to the (much more dangerous) unix calls. //! -//! The main function of the library is [`register`](fn.register.html). +//! # What this crate provides //! -//! It also offers several common actions one might want to register, implemented in the correct -//! way. They are scattered through submodules and have the same limitations and characteristics as -//! the [`register`](fn.register.html) function. Generally, they work to postpone the action taken -//! outside of the signal handler, where the full freedom and power of rust is available. +//! The only thing this crate does is multiplexing the signals. An application or library can add +//! or remove callbacks and have multiple callbacks for the same signal. //! -//! Unlike other Rust libraries for signal handling, this should be flexible enough to handle all -//! the common and useful patterns. +//! It handles dispatching the callbacks and managing them in a way that uses only the +//! [async-signal-safe] functions inside the signal handler. Note that the callbacks are still run +//! inside the signal handler, so it is up to the caller to ensure they are also +//! [async-signal-safe]. //! -//! The library avoids all the newer fancy signal-handling routines. These generally have two -//! downsides: +//! # What this is for //! -//! * They are not fully portable, therefore the library would have to contain *both* the -//! implementation using the basic routines and the fancy ones. As signal handling is not on the -//! hot path of moth programs, this would not bring any actual benefit. -//! * The other routines require that the given signal is masked in all application's threads. As -//! the signals are not masked by default and a new thread inherits the signal mask of its -//! parent, it is possible to guarantee such global mask by masking them before any threads -//! start. While this is possible for an application developer to do, it is not possible for a -//! a library. +//! This is a building block for other libraries creating reasonable abstractions on top of +//! signals. The [signal-hook] is the generally preferred way if you need to handle signals in your +//! application and provides several safe patterns of doing so. //! -//! # Warning +//! # Rust version compatibility //! -//! Even with this library, you should thread with care. It does not eliminate all the problems -//! mentioned above. +//! Currently builds on 1.26.0 an newer and this is very unlikely to change. However, tests +//! require dependencies that don't build there, so tests need newer Rust version (they are run on +//! stable). //! -//! Also, note that the OS may collate multiple instances of the same signal into just one call of -//! the signal handler. Furthermore, some abstractions implemented here also naturally collate -//! multiple instances of the same signal. The general guarantee is, if there was at least one -//! signal of the given number delivered, an action will be taken, but it is not specified how many -//! times ‒ signals work mostly as kind of „wake up now“ nudge, if the application is slow to wake -//! up, it may be nudged multiple times before it does so. -//! -//! # Signal limitations -//! -//! OS limits still apply ‒ it is not possible to redefine certain signals (eg. `SIGKILL` or -//! `SIGSTOP`) and it is probably a *very* stupid idea to touch certain other ones (`SIGSEGV`, -//! `SIGFPE`, `SIGILL`). Therefore, this library will panic if any attempt at manipulating these is -//! made. There are some use cases for redefining the latter ones, but these are not well served by -//! this library and you really *really* have to know what you're doing and are generally on your -//! own doing that. -//! -//! # Signal masks -//! -//! As the library uses `sigaction` under the hood, signal masking works as expected (eg. with -//! `pthread_sigmask`). This means, signals will *not* be delivered if the signal is masked in all -//! program's threads. -//! -//! By the way, if you do want to modify the signal mask (or do other Unix-specific magic), the -//! [nix](https://crates.io/crates/nix) crate offers safe interface to many low-level functions, -//! including -//! [`pthread_sigmask`](https://docs.rs/nix/0.11.0/nix/sys/signal/fn.pthread_sigmask.html). -//! -//! # Portability -//! -//! It should work on any POSIX.1-2001 system, which are all the major big OSes with the notable -//! exception of Windows. -//! -//! Windows has some limited support for signals, patches to include support in this library are -//! welcome. -//! -//! # Examples -//! -//! ```rust -//! extern crate signal_hook; -//! -//! use std::io::Error; -//! use std::sync::Arc; -//! use std::sync::atomic::{AtomicBool, Ordering}; -//! -//! fn main() -> Result<(), Error> { -//! let term = Arc::new(AtomicBool::new(false)); -//! signal_hook::flag::register(signal_hook::SIGTERM, Arc::clone(&term))?; -//! while !term.load(Ordering::Relaxed) { -//! // Do some time-limited stuff here -//! // (if this could block forever, then there's no guarantee the signal will have any -//! // effect). -//! # -//! # // Hack to terminate the example, not part of the real code. -//! # term.store(true, Ordering::Relaxed); -//! } -//! Ok(()) -//! } -//! ``` -//! -//! # Features -//! -//! * `mio-support`: The [`Signals` iterator](iterator/struct.Signals.html) becomes pluggable into -//! mio. -//! * `tokio-support`: The [`Signals`](iterator/struct.Signals.html) can be turned into -//! [`Async`](iterator/struct.Async.html), which provides a `Stream` interface for integration in -//! the asynchronous world. - -// # Internal workings -// -// This uses a form of RCU. There's an atomic pointer to the current action descriptors (in the -// form of IndependentArcSwap, to be able to track what, if any, signal handlers still use the -// version). A signal handler takes a copy of the pointer and calls all the relevant actions. -// -// Modifications to that are protected by a mutex, to avoid juggling multiple signal handlers at -// once (eg. not calling sigaction concurrently). This should not be a problem, because modifying -// the signal actions should be initialization only anyway. To avoid all allocations and also -// deallocations inside the signal handler, after replacing the pointer, the modification routine -// needs to busy-wait for the reference count on the old pointer to drop to 1 and take ownership ‒ -// that way the one deallocating is the modification routine, outside of the signal handler. +//! [signal-hook]: https://docs.rs/signal-hook +//! [async-signal-safe]: http://www.man7.org/linux/man-pages/man7/signal-safety.7.html extern crate arc_swap; -#[cfg(feature = "tokio-support")] -extern crate futures; extern crate libc; -#[cfg(feature = "mio-support")] -extern crate mio; -#[cfg(feature = "mio-support")] -extern crate mio_uds; -#[cfg(feature = "tokio-support")] -extern crate tokio_reactor; use std::collections::hash_map::Entry; use std::collections::{BTreeMap, HashMap}; @@ -151,15 +57,20 @@ use std::sync::{Arc, Mutex, MutexGuard, Once, ONCE_INIT}; use arc_swap::IndependentArcSwap; use libc::{c_int, c_void, sigaction, siginfo_t, sigset_t, SIG_BLOCK, SIG_SETMASK}; -pub mod flag; -pub mod iterator; -pub mod pipe; +use libc::{SIGFPE, SIGILL, SIGKILL, SIGSEGV, SIGSTOP}; -pub use libc::{ - SIGABRT, SIGALRM, SIGBUS, SIGCHLD, SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGIO, SIGKILL, - SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGSTOP, SIGSYS, SIGTERM, SIGTRAP, SIGUSR1, SIGUSR2, - SIGWINCH, -}; +// # Internal workings +// +// This uses a form of RCU. There's an atomic pointer to the current action descriptors (in the +// form of IndependentArcSwap, to be able to track what, if any, signal handlers still use the +// version). A signal handler takes a copy of the pointer and calls all the relevant actions. +// +// Modifications to that are protected by a mutex, to avoid juggling multiple signal handlers at +// once (eg. not calling sigaction concurrently). This should not be a problem, because modifying +// the signal actions should be initialization only anyway. To avoid all allocations and also +// deallocations inside the signal handler, after replacing the pointer, the modification routine +// needs to busy-wait for the reference count on the old pointer to drop to 1 and take ownership ‒ +// that way the one deallocating is the modification routine, outside of the signal handler. #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] struct ActionId(u64); @@ -174,7 +85,7 @@ pub struct SigId { action: ActionId, } -type Action = Fn() + Send + Sync; +type Action = Fn(&siginfo_t) + Send + Sync; #[derive(Clone)] struct Slot { @@ -276,8 +187,10 @@ extern "C" fn handler(sig: c_int, info: *mut siginfo_t, data: *mut c_void) { } } + let info = unsafe { info.as_ref().unwrap() }; + for action in slot.actions.values() { - action(); + action(info); } } } @@ -336,7 +249,7 @@ pub const FORBIDDEN: &[c_int] = &[SIGKILL, SIGSTOP, SIGILL, SIGFPE, SIGSEGV]; /// /// # Panics /// -/// If the signal is one of: +/// If the signal is one of (see [`FORBIDDEN`]): /// /// * `SIGKILL` /// * `SIGSTOP` @@ -345,10 +258,10 @@ pub const FORBIDDEN: &[c_int] = &[SIGKILL, SIGSTOP, SIGILL, SIGFPE, SIGSEGV]; /// * `SIGSEGV` /// /// The first two are not possible to override (and the underlying C functions simply ignore all -/// requests to do so, which smells of possible bugs). The rest can be set, but generally needs -/// very special handling to do so correctly (direct manipulation of the application's address -/// space, `longjmp` and similar). Unless you know very well what you're doing, you'll shoot -/// yourself into the foot and this library won't help you with that. +/// requests to do so, which smells of possible bugs, or return errors). The rest can be set, but +/// generally needs very special handling to do so correctly (direct manipulation of the +/// application's address space, `longjmp` and similar). Unless you know very well what you're +/// doing, you'll shoot yourself into the foot and this library won't help you with that. /// /// # Errors /// @@ -357,7 +270,8 @@ pub const FORBIDDEN: &[c_int] = &[SIGKILL, SIGSTOP, SIGILL, SIGFPE, SIGSEGV]; /// given platform ‒ ofter a program is debugged and tested on a given OS, it should never return /// an error. /// -/// However, if an error *is* returned, there are no guarantees if the given action was registered. +/// However, if an error *is* returned, there are no guarantees if the given action was registered +/// or not. /// /// # Unsafety /// @@ -411,12 +325,40 @@ pub const FORBIDDEN: &[c_int] = &[SIGKILL, SIGSTOP, SIGILL, SIGFPE, SIGSEGV]; pub unsafe fn register(signal: c_int, action: F) -> Result where F: Fn() + Sync + Send + 'static, +{ + register_sigaction(signal, move |_: &_| action()) +} + +/// Register a signal action. +/// +/// This acts in the same way as [`register`], including the drawbacks, panics and performance +/// characteristics. The only difference is the provided action accepts a [`siginfo_t`] argument, +/// providing information about the received signal. +pub unsafe fn register_sigaction(signal: c_int, action: F) -> Result +where + F: Fn(&siginfo_t) + Sync + Send + 'static, { assert!( !FORBIDDEN.contains(&signal), "Attempted to register forbidden signal {}", signal, ); + register_unchecked(signal, action) +} + +/// Register a signal action without checking for forbidden signals. +/// +/// This acts the same way as [`register_sigaction`], but without checking for the [`FORBIDDEN`] +/// signals. All the signal passed are registered and it is up to the caller to make some sense of +/// them. +/// +/// Note that you really need to know what you're doing if you change eg. the `SIGSEGV` signal +/// handler. Generally, you don't want to do that. But unlike the other functions here, this +/// function still allows you to do it. +pub unsafe fn register_unchecked(signal: c_int, action: F) -> Result +where + F: Fn(&siginfo_t) + Sync + Send + 'static, +{ let globals = GlobalData::ensure(); let (mut signals, mut lock) = globals.load(); let id = ActionId(*lock); @@ -474,6 +416,13 @@ pub fn unregister(id: SigId) -> bool { #[cfg(test)] mod tests { + use std::sync::atomic::{AtomicUsize, Ordering}; + use std::sync::Arc; + use std::thread; + use std::time::Duration; + + use libc::{pid_t, SIGUSR1, SIGUSR2}; + use super::*; #[test] @@ -482,6 +431,57 @@ mod tests { let _ = unsafe { register(SIGKILL, || ()) }; } + /// Registering the forbidden signals is allowed in the _unchecked version. + #[test] + fn forbidden_raw() { + unsafe { register_unchecked(SIGFPE, |_| std::process::abort()).unwrap() }; + } + + #[test] + fn signal_with_pid() { + let status = Arc::new(AtomicUsize::new(0)); + let action = { + let status = Arc::clone(&status); + move |siginfo: &siginfo_t| { + // Hack: currently, libc exposes only the first 3 fields of siginfo_t. The pid + // comes somewhat later on. Therefore, we do a Really Ugly Hack and define our + // own structure (and hope it is correct on all platforms). But hey, this is + // only the tests, so we are going to get away with this. + #[repr(C)] + struct SigInfo { + _fields: [c_int; 3], + #[cfg(all(target_pointer_width = "64", target_os = "linux"))] + _pad: c_int, + pid: pid_t, + } + let s: &SigInfo = unsafe { + (siginfo as *const _ as usize as *const SigInfo) + .as_ref() + .unwrap() + }; + status.store(s.pid as usize, Ordering::Relaxed); + } + }; + let pid; + unsafe { + pid = libc::getpid(); + register_sigaction(SIGUSR2, action).unwrap(); + libc::kill(pid, SIGUSR2); + } + for _ in 0..10 { + thread::sleep(Duration::from_millis(100)); + let current = status.load(Ordering::Relaxed); + match current { + // Not yet (PID == 0 doesn't happen) + 0 => continue, + // Good, we are done with the correct result + _ if current == pid as usize => return, + _ => panic!("Wrong status value {}", current), + } + } + panic!("Timed out waiting for the signal"); + } + /// Check that registration works as expected and that unregister tells if it did or not. #[test] fn register_unregister() { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/tests/version.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/tests/version.rs new file mode 100644 index 0000000000..411eea548e --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/signal-hook-registry-1.0.1/tests/version.rs @@ -0,0 +1,12 @@ +#[macro_use] +extern crate version_sync; + +#[test] +fn test_readme_deps() { + assert_markdown_deps_updated!("README.md"); +} + +#[test] +fn test_html_root_url() { + assert_html_root_url_updated!("src/lib.rs"); +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.travis.yml deleted file mode 100644 index 7375a51554..0000000000 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: rust -sudo: false - -matrix: - include: - - rust: 1.21.0 - - rust: stable - - os: osx - - rust: beta - - rust: nightly - - - rust: nightly - before_script: - - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH - script: - - cargo doc --no-deps --all-features - after_success: - - travis-cargo --only nightly doc-upload - - - rust: nightly - before_script: - - rustup target add x86_64-unknown-redox --toolchain nightly - script: - - cargo check --target x86_64-unknown-redox - -script: - - cargo test - - cargo test --features "reuseport unix pair" - -env: - global: - secure: "qibsiOrfM/GjYgYFXycSqKMwIK9ZR4cvHZsSqTtqrtxGq5Q7jTwMqdDl8KHDgX1a4it4tGay+7joex8k2zL6OQ+FljQGQq54EDiGw82HWix/fBpOMjMszw+GEDMG/9hUSb6HFdzAKLPAsBRvIs2QteJ60GhL/w4Z/EmfHlVKMnVsYUjfBf5BNlkv8yFvRMY6QqL+F85N7dDQ7JAgdiP79jR7LP8IlCEu/8pgSrf9pSqAHSC1Co1CaN8uhhMlcIIOZ5qYAK4Xty26r2EDzPm5Lw2Bd7a4maN0x+Be2DJvrnX30QkJNNU1XhxYkeZEeUCYAlUhBE5nBHpyyrbAxv+rJodPeyRl5EVpyqi8htPVmcnuA2XpNoHCud7CnzxaFytGvAC5kp0EgS7f3ac4hTnZXCfP0CvnT5UyWfWv9yLwQycdYcAsV4TnKxVAw4ykApGey+h0dyIM2VnzRPOo9D2ZS+JpzPHtx/PXD7aN7IungfTj4PmT+i00QNzkzJR9BqYKmEDBUcz6MLctg4D6xChhN8Go4hvk22F0RVyvEg1MAvXc07EKeWXG/VZ+H2frcPEceMGRBBHiOfOEE/2utNYgvIcmQxd1hvbm3cQOIjeXU2rGneN86cSmx7zNlfOyJUoBfsgGvSEzRxUueibUCaujB/El70HGrMlTnXeERiyd/2Y=" - -notifications: - email: - on_success: never diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.appveyor.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.appveyor.yml similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.appveyor.yml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.appveyor.yml diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.cargo-ok new file mode 100644 index 0000000000..b5754e2037 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.cargo-ok @@ -0,0 +1 @@ +ok \ No newline at end of file diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.cargo_vcs_info.json b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.cargo_vcs_info.json new file mode 100644 index 0000000000..2f1cb738d1 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.cargo_vcs_info.json @@ -0,0 +1,5 @@ +{ + "git": { + "sha1": "28bdf727744dd9b6094a0bca47062acb6161c20c" + } +} diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.gitignore b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.gitignore similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/.gitignore rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.gitignore diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.travis.yml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.travis.yml new file mode 100644 index 0000000000..fd7b364301 --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/.travis.yml @@ -0,0 +1,35 @@ +language: rust +sudo: false + +matrix: + include: + - rust: 1.21.0 + - rust: stable + - os: osx + - rust: beta + - rust: nightly + + - name: "master doc to gh-pages" + rust: nightly + script: + - cargo doc --no-deps + deploy: + provider: script + script: curl -LsSf https://git.io/fhJ8n | rustc - && (cd target/doc && ../../rust_out) + skip_cleanup: true + on: + branch: master + + - rust: nightly + before_script: + - rustup target add x86_64-unknown-redox --toolchain nightly + script: + - cargo check --target x86_64-unknown-redox + +script: + - cargo test + - cargo test --features "reuseport unix pair" + +notifications: + email: + on_success: never diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/Cargo.toml b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/Cargo.toml similarity index 95% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/Cargo.toml rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/Cargo.toml index 66b97069bd..7526094bd9 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/Cargo.toml +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/Cargo.toml @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "socket2" -version = "0.3.8" +version = "0.3.9" authors = ["Alex Crichton "] description = "Utilities for handling networking sockets with a maximal amount of configuration\npossible intended.\n" homepage = "https://github.com/alexcrichton/socket2-rs" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/Cargo.toml.orig b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/Cargo.toml.orig similarity index 97% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/Cargo.toml.orig rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/Cargo.toml.orig index f783047fe9..66eed6dc97 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/Cargo.toml.orig +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "socket2" -version = "0.3.8" +version = "0.3.9" authors = ["Alex Crichton "] license = "MIT/Apache-2.0" readme = "README.md" diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/LICENSE-APACHE b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/LICENSE-APACHE new file mode 100644 index 0000000000..16fe87b06e --- /dev/null +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/LICENSE-MIT b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/LICENSE-MIT similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/LICENSE-MIT rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/LICENSE-MIT diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/README.md b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/README.md similarity index 85% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/README.md rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/README.md index 2936503ffc..0e9e914818 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/README.md +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/README.md @@ -1,6 +1,6 @@ # socket2-rs -[![Build Status](https://travis-ci.org/alexcrichton/socket2-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/socket2-rs) +[![Build Status](https://travis-ci.com/alexcrichton/socket2-rs.svg?branch=master)](https://travis-ci.com/alexcrichton/socket2-rs) [![Build status](https://ci.appveyor.com/api/projects/status/hovebj1gr4bgm3d9?svg=true)](https://ci.appveyor.com/project/alexcrichton/socket2-rs) [Documentation](https://docs.rs/socket2) diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/lib.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/lib.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/lib.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/lib.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sockaddr.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sockaddr.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sockaddr.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sockaddr.rs index 5e335db9be..9806ad832d 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sockaddr.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sockaddr.rs @@ -123,7 +123,7 @@ impl SockAddr { unsafe { self.as_(AF_INET as sa_family_t) } } - /// Returns this address as a `SocketAddrV4` if it is in the `AF_INET6` + /// Returns this address as a `SocketAddrV6` if it is in the `AF_INET6` /// family. pub fn as_inet6(&self) -> Option { unsafe { self.as_(AF_INET6 as sa_family_t) } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/socket.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/socket.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/socket.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/socket.rs index b3297d6672..4396002200 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/socket.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/socket.rs @@ -982,4 +982,16 @@ mod test { #[cfg(unix)] assert_eq!(socket.keepalive().unwrap(), None); } + + #[test] + fn nodelay() { + let socket = Socket::new(Domain::ipv4(), Type::stream(), None).unwrap(); + + assert!(socket.set_nodelay(true).is_ok()); + + let result = socket.nodelay(); + + assert!(result.is_ok()); + assert!(result.unwrap()); + } } diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/redox/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/redox/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/redox/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/redox/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/unix/mod.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/unix/mod.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/unix/mod.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/unix/mod.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/unix/weak.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/unix/weak.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/unix/weak.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/unix/weak.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/windows.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/windows.rs similarity index 99% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/windows.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/windows.rs index e6c8f114c1..eb9329f212 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/sys/windows.rs +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/sys/windows.rs @@ -445,13 +445,13 @@ impl Socket { pub fn nodelay(&self) -> io::Result { unsafe { - let raw: c_int = self.getsockopt(IPPROTO_TCP, TCP_NODELAY)?; + let raw: c_char = self.getsockopt(IPPROTO_TCP, TCP_NODELAY)?; Ok(raw != 0) } } pub fn set_nodelay(&self, nodelay: bool) -> io::Result<()> { - unsafe { self.setsockopt(IPPROTO_TCP, TCP_NODELAY, nodelay as c_int) } + unsafe { self.setsockopt(IPPROTO_TCP, TCP_NODELAY, nodelay as c_char) } } pub fn broadcast(&self) -> io::Result { diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/utils.rs b/rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/utils.rs similarity index 100% rename from rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.8/src/utils.rs rename to rust_crates/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.9/src/utils.rs diff --git a/rust_crates/registry/src/github.com-1ecc6299db9ec823/utime-0.2.1/.cargo-ok b/rust_crates/registry/src/github.com-1ecc6299db9ec823/utime-0.2.1/.cargo-ok index e69de29bb2..b5754e2037 100644 --- a/rust_crates/registry/src/github.com-1ecc6299db9ec823/utime-0.2.1/.cargo-ok +++ b/rust_crates/registry/src/github.com-1ecc6299db9ec823/utime-0.2.1/.cargo-ok @@ -0,0 +1 @@ +ok \ No newline at end of file