From 84732f7278d43f2eb602a1b2f8a21a1b335bf33d Mon Sep 17 00:00:00 2001 From: Dzenis Madzovic <89925489+PsychicPlatypus@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:10:46 +0200 Subject: [PATCH] Remove unused typespecs, fix typespec (#250) --- lib/mongo.ex | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/mongo.ex b/lib/mongo.ex index fcb2ddf3..71cb167d 100644 --- a/lib/mongo.ex +++ b/lib/mongo.ex @@ -71,9 +71,8 @@ defmodule Mongo do @type conn :: DbConnection.Conn @type collection :: String.t() @type cursor :: Mongo.Cursor.t() - @type result(t) :: :ok | {:ok, t} | {:error, Mongo.Error.t()} | {:error, Mongo.WriteError.t()} + @type result(t) :: {:ok, t} | {:error, Mongo.Error.t()} | {:error, Mongo.WriteError.t()} @type result!(t) :: t - @type initial_type :: :unknown | :single | :replica_set_no_primary | :sharded defmacrop bangify(result) do quote do @@ -474,7 +473,7 @@ defmodule Mongo do BSON.document(), BSON.document(), Keyword.t() - ) :: result(Mongo.FindAndModifyResult.t()) | {:ok, nil} + ) :: result(Mongo.FindAndModifyResult.t()) def find_one_and_update(topology_pid, coll, filter, update, opts \\ []) do _ = modifier_docs(update, :update)